Note searching method, electronic device, storage medium and program product
By providing multiple classification search options and participle pinyin search in the note application, combining data storage and index query modules, the problem of low efficiency and poor accuracy of note search is solved, and fast and accurate note search is achieved.
Patent Information
- Application Number
- CN202311848964.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-12-28
- Publication Date
- 2025-07-08
- Estimated Expiration
- 2043-12-28
AI Technical Summary
In note-taking applications, it is difficult for users to quickly and accurately search the required notes, and the search methods of the prior art are inefficient and poorly accurate, especially when the notes are complex or the search terms are homophones and different words.
By providing multiple classification search options on the interface of the note application, entering multiple search terms or pinyins spaced from each other, combining the list display interface, data storage module, index query module and search middle platform, classify search, word segmentation search and pinyin search, improving search efficiency and accuracy.
It realizes the quick and accurate search of target notes in the note-taking application, and the search methods are diversified, reducing the time and error of users looking for a large number of notes.
Smart Images

Figure CN120277226A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of electronic technologies, and in particular, to a note search method, an electronic device, a storage medium, and a program product. Background Art
[0002] With the continuous development of electronic technologies, electronic devices have become relatively common tools in people's lives and work, and users often need to install various types of application programs on electronic devices due to different needs. For example, by installing a note application on an electronic device, a user can add corresponding notes in the note application to record some information in life and work.
[0003] If a user stores a large number of notes in a note application, when the user needs to use the information recorded in one of the notes, the user needs to search in the note application. Therefore, how to quickly and accurately search for the corresponding note in the note application has become a problem to be solved. Summary of the Invention
[0004] Embodiments of this application provide a note search method, an electronic device, a storage medium, and a program product, enabling a user to quickly and accurately search for the corresponding note in a note application.
[0005] In a first aspect, an embodiment of this application proposes a note search method applied to an electronic device. The electronic device includes a note application. The note search method includes: the electronic device displays a first interface of the note application; the electronic device searches for note data corresponding to a target note from the stored note data in response to a target operation input to the first interface; 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. Among them, the first operation is an operation input to a target classification search option among a plurality of 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 a plurality of search terms 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 a plurality of search terms; 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.
[0006] In this way, based on multiple classification search options included in the first interface, classified search of notes stored in the note application can be implemented; by entering multiple search terms set at intervals in the search box, word segmentation search of notes stored in the note application can be implemented; by entering pinyin in the search box, pinyin search of notes stored in the note application can be implemented. In this way, users can quickly and accurately search for corresponding notes, and the note search methods are made more diverse.
[0007] In a possible implementation, the note application includes a list display interface, a data storage module, and an index query module. The electronic device responds to a target operation input to the first interface and searches for note data corresponding to the target note from the stored note data, including: the list display interface responds to a first operation input to the target classification search option and sends a first search request to the index query module; the first search request includes the attachment type indicated by the target classification search option; the index query module sends the first search request to the data storage module; the data storage module searches for 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. In this way, classified search of notes stored in the note application can be implemented through the list display interface, the data storage module, and the index query module.
[0008] In a possible implementation, the note application includes a list display interface, a data storage module, and an index query module, and the electronic device further includes a search middleware platform. The electronic device responds to a target operation input to the first interface and searches for note data corresponding to the target note from the stored note data, including: the list display interface responds to a second operation of entering multiple search terms set at intervals in the search box and sends a second search request to the index query module; the second search request includes multiple search terms; the index query module sends a third search request to the search middleware platform based on the second search request; the third search request includes multiple search terms and a first search method; the search middleware platform searches for first index content from the stored index content according to the first search method; the first index content includes multiple search terms; the search middleware platform returns the first index content to the index query module; the index query module searches for 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. In this way, word segmentation search of notes stored in the note application can be implemented through the list display interface, the data storage module, the index query module, and the search middleware platform.
[0009] In a possible implementation, the first index content further includes a first note identifier. 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, 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 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; the data storage module returns the note data corresponding to the second note to the index query module.
[0010] In a possible implementation, the first search method includes a single-character search method. The search middleware searches for the first index content from the stored index content according to the first search method, including: the search middleware 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 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; when the indexes of each keyword in the search term are adjacent, the search middleware determines that the search term matches successfully; when 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. In this way, the first search content including multiple search terms can be searched from all the stored index content based on the single-character search method, making the search accuracy of the first search content higher.
[0011] In a possible implementation, the note application includes a list display interface, a data storage module, and an index query module, and the electronic device further includes a search middleware. 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, including: the list display interface sends a fifth search request to the index query module in response to a third operation of inputting pinyin in the search box; the fifth search request includes the pinyin; the index query module sends a sixth search request to the search middleware based on the fifth search request; the sixth search request includes the pinyin and a second search method, and the second search method includes a pinyin search method; the search middleware searches for 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 middleware 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 second index content; the index query module returns the note data corresponding to the third note to the list display interface. In this way, pinyin search for the notes stored in the note application can be implemented through the list display interface, the data storage module, the index query module, and the search middleware.
[0012] In a possible implementation, the second index content further includes a second note identifier. 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, 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.
[0013] In a possible implementation, before the electronic device displays the target note based on the note data corresponding to the target note, it includes: in the case where there are multiple target notes, the electronic device sorts the note data corresponding to the multiple target notes according to a preset sorting method. Among them, 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 word in the target note, and the position of the matching word in the target note includes at least one of the title position, the body position, and the picture position; in the case where the target note is the second note, the matching word is multiple search words; in the case where the target note is the third note, the matching word is the keyword corresponding to the pinyin. In this way, the electronic device can display multiple sorted target notes for the user to view.
[0014] In a possible implementation, the note application further includes a detail 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: the list display interface sends the note data corresponding to the target note selected by the fourth operation and the matching word to the detail editing and display interface in response to the fourth operation on any one of the target notes; the detail editing and display interface displays the target note selected by the fourth operation based on the note data corresponding to the target note selected by the fourth operation, and displays the matching word in the target note selected by the fourth operation in a preset display manner. Among them, in the case where the target note is the second note, the matching word is multiple search words; in the case where the target note is the third note, the matching word is the keyword corresponding to the pinyin; the preset display manner includes at least one of highlighting, bolding, and italicizing. In this way, the matching word in the target note selected by the fourth operation is displayed in a preset display manner, enabling the user to quickly locate the position of the matching word in the target note selected by the fourth operation.
[0015] In a possible implementation, the details editing display interface displays the matching words in the target note selected by the fourth operation in a preset display manner, including: when the matching words in the target note selected by the fourth operation include handwritten matching words, the details editing display interface obtains the position information of the handwritten matching words; the details editing display interface highlights the area corresponding to the position information. In this way, the handwritten matching words can be highlighted.
[0016] In a possible implementation, the details editing display interface displays the matching words in the target note selected by the fourth operation in a preset display manner, including: when the matching words in the target note selected by 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 non-handwritten matching word with the largest length among the multiple non-handwritten matching words in a preset display manner. In this way, the non-handwritten matching words can be highlighted, and the situation of repeatedly highlighting the overlapping matching characters among the multiple non-handwritten matching words can be reduced.
[0017] In a possible implementation, the note application includes a details editing display interface, a data storage module, and an index creation module, and the electronic device further includes a search middleware platform. Before the electronic device displays the first interface of the note application, it further includes: the details editing display interface, in response to a fifth operation on the fourth note that has been edited, 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 middleware platform; the data storage module sends a picture index insertion request corresponding to the fourth note to the index creation module; the picture index insertion request includes the note data corresponding to the fourth note; the index creation module constructs the picture index content corresponding to the fourth note based on the note data corresponding to the fourth note in the picture index insertion request; the index creation module sends the picture index content corresponding to the fourth note to the search middleware platform. In this way, the index content corresponding to the note can be constructed to support functions such as classification search, word segmentation search, and pinyin search on the electronic device; and by saving the note data first and then triggering the insertion of the picture index content, in scenarios such as when the system of the electronic device is abnormal or the electronic device is restarted, for the same note, the note data of the note is stored in the data storage module, and the index content of the note is also stored in the search middleware platform, thereby improving the situation where the data in the data storage module does not correspond to the data in the search middleware platform.
[0018] In a second aspect, an embodiment of the present application provides an electronic device, including a memory and a processor. The memory is used to store a computer program, and the processor is used to call the computer program to execute the above-mentioned note search method.
[0019] In a third aspect, an embodiment of the present application provides a computer-readable storage medium, in which a computer program or instruction is stored. When the computer program or instruction is run, the above-mentioned note search method is implemented.
[0020] In a fourth aspect, an embodiment of the present application provides a computer program product, including a computer program. When the computer program is run, it causes a computer to execute the above-mentioned note search method.
[0021] For each possible implementation manner of the second aspect to the fourth aspect, the effects are similar to those of the first aspect and the possible designs of the first aspect, and will not be elaborated here. Description of the Drawings
[0022] Figure 1 It is a schematic diagram of the hardware system structure of the electronic device provided by the embodiment of the present application;
[0023] Figure 2 It is a schematic diagram of the software system structure of the electronic device provided by the embodiment of the present application;
[0024] Figure 3 It is a schematic diagram of the interface during the note creation process provided by the embodiment of the present application;
[0025] Figure 4 It is a schematic diagram of the interface for adding recording, handwritten content, and pictures to a note provided by the embodiment of the present application;
[0026] Figure 5 It is a schematic diagram of the module interaction for note index creation provided by the embodiment of the present application;
[0027] Figure 6 It is a schematic diagram of the process for note index creation provided by the embodiment of the present application;
[0028] Figure 7 It is a schematic diagram of the interface for classifying and searching notes provided by the embodiment of the present application;
[0029] Figure 8 It is a schematic diagram of the module interaction for classifying and searching notes provided by the embodiment of the present application;
[0030] Figure 9 It is a schematic diagram of the interface for classifying and searching notes and searching by search terms provided by the embodiment of the present application;
[0031] Figure 10Schematic diagram of module interaction for classifying and searching notes and searching for search terms provided by embodiments of the present application;
[0032] Figure 11 Schematic diagram of the process for classifying and searching notes and searching for search terms provided by embodiments of the present application;
[0033] Figure 12 Schematic diagram of the interface for segmenting and searching notes provided by embodiments of the present application;
[0034] Figure 13 Schematic diagram of module interaction for segmenting and searching notes provided by embodiments of the present application;
[0035] Figure 14 Schematic diagram of the process for segmenting and searching notes provided by embodiments of the present application;
[0036] Figure 15 Schematic diagram of the interface for searching notes by pinyin provided by embodiments of the present application;
[0037] Figure 16 Schematic diagram of module interaction for searching notes by pinyin provided by embodiments of the present application;
[0038] Figure 17 Schematic diagram of the interface for highlighting search terms in the target notes found by searching provided by embodiments of the present application;
[0039] Figure 18 Schematic diagram of module interaction for highlighting search terms in the target notes found by searching provided by embodiments of the present application;
[0040] Figure 19 Schematic diagram of the process for highlighting search terms in the target notes found by searching provided by embodiments of the present application;
[0041] Figure 20 Schematic diagram of the structure of a note search device provided by embodiments of the present application;
[0042] Figure 21 Schematic diagram of the structure of a chip provided by embodiments of the present application. Detailed implementation manners
[0043] For the convenience of clearly describing the technical solutions of the embodiments of the present application, in the embodiments of the present application, terms such as "first" and "second" are used to distinguish the same items or similar items with basically the same functions and effects. For example, the first chip and the second chip are only used to distinguish different chips, and do not limit their sequence. Those skilled in the art can understand that the terms "first" and "second" do not limit the quantity and execution order, and the terms "first" and "second" do not necessarily limit being different.
[0044] It should be noted that in the embodiments of the present application, words such as "exemplary" or "for example" are used to give examples, illustrations or explanations. Any embodiment or design solution described as "exemplary" or "for example" in the present application should not be construed as being more preferred or having more advantages than other embodiments or design solutions. Rather, the use of words such as "exemplary" or "for example" is intended to present related concepts in a specific manner.
[0045] In the embodiments of the present application, "at least one" means one or more, and "a plurality" means two or more. "And / or" describes the association relationship of associated objects, indicating that three relationships can exist. For example, A and / or B can represent: A exists alone, A and B exist simultaneously, and B exists alone, where A and B can be singular or plural. The character " / " generally represents an "or" relationship between the associated objects before and after. "At least one (item)" or its similar expression refers to any combination of these items, including any combination of single item (item) or plural items (items). For example, at least one (item) of a, b, or c can represent: a, b, c, a - b, a - c, b - c, or a - b - c, where a, b, c can be single or multiple.
[0046] In the related art, if a user stores a large number of notes in a note application, when the user needs to use the information of one of the note records, the user needs to search through the note list displayed on the application interface of the note application, or enter a single search term in the search box on the application interface of the note application to search through all the notes stored in the note application.
[0047] Taking the method of entering a single search term in the search box on the application interface of the note application for searching as an example. If the user wants to find the ID card information of a certain user stored in the note, since the content of the ID card information is relatively complex, the user may have difficulty remembering this information and thus may not be able to search it by entering a search term in the search box; or, if the notes searched by the user through a single search term include many notes, the user still needs to search through the searched notes, resulting in the user spending a relatively long time to find the required note; or, if there are Chinese characters with the same pronunciation but different characters in the search term entered by the user in the search box, it is possible that the search term entered by the user in the search box is inconsistent with the words stored in the note, and in this way, the corresponding note cannot be searched.
[0048] Therefore, the method of searching for notes in the note application in the related art may cause the user to be unable to quickly and accurately search for the corresponding notes.
[0049] Based on this, an embodiment of the present application provides a note search method. By displaying a first interface of a note application, in response to a target operation input to the first interface, search for note data corresponding to a target note from the stored note data, and display the target note based on the note data corresponding to the target note. Among them, the target operation includes at least one of a first operation, a second operation, and a 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 terms 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 terms; 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 keywords corresponding to the pinyin.
[0050] Therefore, it is possible to implement classified search for the notes stored in the note application based on multiple classification search options included in the first interface; by inputting multiple search terms spaced apart from each other in the search box, implement word segmentation search for the notes stored in the note application; by inputting pinyin in the search box, implement pinyin search for the notes stored in the note application. In this way, it is possible to enable users to quickly and accurately search for the corresponding notes, and make the note search method more diverse.
[0051] For example, if a user wants to find the ID card information of a certain user stored in the notes, the user can input the first operation to the card certificate search option among multiple classification search options to search for the notes containing ID card information from the notes stored in the note application, so that the user can quickly and accurately search for the corresponding notes; or, the user can input multiple search terms spaced apart from each other in the search box to search for the notes containing multiple search terms from the notes stored in the note application, so that the number of searched notes is reduced, and thus the user can quickly and accurately search for the corresponding notes; or, the user can input pinyin in the search box to search for the notes containing keywords corresponding to the pinyin from the notes stored in the note application. Among the searched notes, the keywords corresponding to the pinyin included therein may have Chinese characters with the same pronunciation but different characters, so that the user can quickly and accurately search for the corresponding notes.
[0052] The note search method provided by the embodiments of this application can be applied to an electronic device with a note application. The electronic device includes a terminal device, which can also be referred to as a terminal, user equipment (UE), mobile station (MS), mobile terminal (MT), etc. The electronic device can be a mobile phone, smart TV, wearable device, tablet computer (Pad), computer with wireless transceiver function, virtual reality (VR) device, augmented reality (AR) device, wireless terminal in industrial control, wireless terminal in self-driving, wireless terminal in remote medical surgery, wireless terminal in smart grid, wireless terminal in transportation safety, wireless terminal in smart city, wireless terminal in smart home, and so on. The embodiments of this application do not limit the specific technologies and specific device forms adopted by the electronic device.
[0053] To better understand the embodiments of this application, the structure of the electronic device in the embodiments of this application will be introduced below.
[0054] Figure 1 FIG. shows the schematic structural diagram of the electronic device 100. The 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, an antenna 1, an 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 interface 170D, a sensor module 180, a button 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 can be understood that the structure illustrated in the embodiments of this application does 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 those illustrated, or combine certain components, or split certain components, or have different component arrangements. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.
[0056] The processor 110 may include one or more processing units. For example, the processor 110 may include an application processor (AP), a modem processor, a graphics processing unit (GPU), an image signal processor (ISP), a controller, a video codec, a digital signal processor (DSP), a baseband processor, and / or a neural-network processing unit (NPU), etc. Among them, different processing units may be independent devices or integrated in one or more processors.
[0057] The controller can generate operation control signals according to the instruction operation code and timing signals to complete the control of fetching and executing instructions.
[0058] A memory may also be provided in the processor 110 for storing instructions and data. In some embodiments, the memory in the processor 110 is a cache memory. This memory can store the instructions or data that the processor 110 has just used or recycled. If the processor 110 needs to use the instruction or data again, it can be called 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 is used to receive a charging input from a charger. Among them, the charger may be a wireless charger or a wired charger. In some embodiments of wired charging, the charging management module 140 may receive the charging input from a wired charger through the USB interface 130. In some embodiments of wireless charging, the charging management module 140 may receive the wireless charging input through 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 through 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 the inputs from the battery 142 and / or the charging management module 140 and supplies power to the processor 110, the internal memory 121, the display screen 194, the camera 193, the wireless communication module 160, etc.
[0061] The wireless communication function of the electronic device 100 can be implemented by the antenna 1, the antenna 2, the mobile communication module 150, the wireless communication module 160, the modulation and demodulation processor, and the baseband processor, etc.
[0062] The antenna 1 and the antenna 2 are used to transmit and receive electromagnetic wave signals. The antennas in the electronic device 100 can be used to cover single or multiple communication frequency bands. Different antennas can also be multiplexed to improve the utilization rate of the antennas. For example: The antenna 1 can be multiplexed as the diversity antenna of the wireless local area network. In some other embodiments, the antenna can be used in combination with the tuning switch.
[0063] The mobile communication module 150 can provide solutions for wireless communications including 2G / 3G / 4G / 5G, etc. applied to the electronic device 100. The mobile communication module 150 can include at least one filter, switch, power amplifier, low noise amplifier (LNA), etc.
[0064] The wireless communication module 160 can provide solutions for wireless communications including wireless local area networks (WLAN) (such as wireless fidelity (Wi-Fi) networks), Bluetooth (BT), global navigation satellite system (GNSS), frequency modulation (FM), near field communication (NFC), infrared technology (IR), etc. applied to the electronic device 100. 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 the antenna 2, performs frequency modulation and filtering processing on the electromagnetic wave signals, and sends the processed signals to the processor 110. The wireless communication module 160 can also receive the signals to be sent from the processor 110, perform frequency modulation and amplification on them, and convert them into electromagnetic waves through the antenna 2 for radiation.
[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, such that electronic device 100 can communicate with a network and other devices through wireless communication technologies.
[0066] Electronic device 100 implements a display function through a GPU, display screen 194, application processor, etc. The GPU is a microprocessor for image processing, connected to display screen 194 and the application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. Processor 110 may include one or more GPUs, which execute program instructions to generate or change display information.
[0067] Display screen 194 is used to display images, videos, receive swipe operations, etc. Display screen 194 includes a display panel. The display panel may adopt 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 MiniLED, a MicroLED, a Micro-OLED, a quantum dot light-emitting diode (QLED), etc. In some embodiments, electronic device 100 may include one or more display screens 194.
[0068] Electronic device 100 can implement a shooting function through an ISP, camera 193, video codec, GPU, display screen 194, application processor, etc.
[0069] The ISP is used to process the data fed back by camera 193. For example, when taking a photo, the shutter is opened, and light passes through the lens and is transmitted to the camera photosensitive element. The optical signal is converted into an electrical signal, and the camera photosensitive element transmits the electrical signal to the ISP for processing and converts it into an image visible to the naked eye. The ISP can also perform algorithm optimization on the noise, brightness, and skin color of the image. The ISP can also optimize parameters such as the exposure and color temperature of the shooting scene. In some embodiments, the ISP may be provided in camera 193.
[0070] The camera 193 is used to capture still images or videos. An object generates an optical image through the lens and projects it onto the photosensitive element. The photosensitive element can be a charge coupled device (CCD) or a complementary metal-oxide-semiconductor (CMOS) phototransistor. The photosensitive element converts the optical signal into an electrical signal, and then transmits the electrical signal to the ISP to be converted into a digital image signal. The ISP outputs the digital image signal to the DSP for processing. The DSP converts the digital image signal into an image signal in standard formats such as RGB and YUV. In some embodiments, the electronic device 100 may include one or more cameras 193.
[0071] The external memory 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 memory interface 120 to implement the data storage function. For example, files such as music and videos are saved in the external memory card.
[0072] The internal memory 121 can be used to store computer-executable program code, and the executable program code includes instructions. The internal memory 121 may include a program storage area and a data storage area. Among them, the program storage area can store the operating system, application programs required for at least one function (such as the sound playback function, the image playback function, etc.). The data storage area can store the data created during the use of the electronic device 100 (such as audio data, phone book, etc.). In addition, the 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, a flash memory device, a universal flash storage (UFS), etc. The processor 110 executes various functional applications and data processing of the electronic device 100 by running the instructions stored in the internal memory 121 and / or the instructions stored in the memory provided in the processor.
[0073] The electronic device 100 can implement audio functions through the audio module 170, the speaker 170A, the receiver 170B, the microphone 170C, the headphone jack 170D, and the application processor, etc. For example, music playback, recording, etc.
[0074] The keys 190 include a power-on key, volume keys, etc. The keys 190 can be mechanical keys or touch keys. The electronic device 100 can receive key inputs and generate key signal inputs related to the user settings and function controls of the electronic device 100.
[0075] The motor 191 can generate vibration prompts. The motor 191 can be used for incoming call vibration prompts and also for touch vibration feedback. The indicator 192 can be an indicator light, which can be used to indicate the charging state, power change, and can also be used to indicate messages, missed calls, notifications, etc. The SIM card interface 195 is used to connect the SIM card. The SIM card can be in contact with and separated from the electronic device 100 by inserting into or removing from the SIM card interface 195.
[0076] The software system of the electronic device 100 can adopt a layered architecture, event-driven architecture, microkernel architecture, microservices architecture, or cloud architecture, etc. In the embodiment of this application, the Android system with a layered architecture is taken as an example to exemplarily illustrate the software structure of the electronic device 100.
[0077] Figure 2 It is the software structure block diagram of the electronic device in the embodiment of this application. The layered architecture divides the software into several layers, and each layer has a clear role and division of labor. The layers communicate with each other through software interfaces. In some embodiments, the Android system is divided into four layers, from top to bottom are the application layer, application framework layer, Android runtime and system libraries, and kernel layer.
[0078] The application layer can include a series of application packages. As Figure 2 shown, the application packages can be note applications, search middle platforms, and global search modules, etc.
[0079] The note application is an application program with note functions. Exemplarily, this note application can also be called a memo application, electronic sticky note application, or notepad application, etc.
[0080] In some embodiments, the note application can include an index creation module, an index query module, a list display interface, a data storage module, and a detail editing display interface, and the index creation module, index query module, list display interface, data storage module, and detail editing display interface are all modules used to implement the note functions of the note application.
[0081] Among them, the index creation module can include the creation of index content corresponding to the text content, handwritten content, picture content, and other searchable content corresponding to the note.
[0082] The index query module can include a local search sub-module, a kit search sub-module, and a data merging and sorting sub-module.
[0083] The local search sub-module 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 a first operation is input for the target classification search option among multiple classification search options and no search term is entered in the search box; alternatively, the local search sub-module 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 cannot be found in the search middle platform.
[0084] The kit search sub-module can be used to search for the index content corresponding to the target note from the search middle platform, and the index content includes text index content and / or picture index content.
[0085] The data merging and sorting sub-module can be used to merge the note data corresponding to the picture and the note data corresponding to the text when the target note includes a picture and text; the data merging and sorting sub-module 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 can be used to display the searched note list. The data storage module can be used to store the note data corresponding to the note, and the note data includes a note table and an attachment table. The detail editing display interface can be used to display the note during the creation or editing of the note, and when a certain note in the note list display is opened, display the detail interface of the note, and the detail interface includes the note content of the note.
[0087] In some embodiments, the search middle platform may include a note index library. The note index library may include the text index content of the note, the picture index content of the note, the handwritten text box index content of the note, and other index contents, etc.
[0088] In addition, the search middle platform may also include a calendar index library, a gallery index library, a document management index library, and other index libraries, etc. The calendar index library is the index library corresponding to the calendar application, the gallery index library is the index library corresponding to the gallery application, and the document management index library is the index library corresponding to the file management application.
[0089] In some embodiments, the global search module may include a search sub-module, and the search sub-module can support searching in the search box included in the negative first screen of the electronic device.
[0090] The application framework layer provides application programming interfaces (APIs) and programming frameworks for the application programs in the application layer. The application framework layer includes some predefined functions.
[0091] Such as Figure 2As shown, the application framework layer may include an input system, a window manager, an activity manager, a resource manager, a phone manager, a view system, a notification manager, etc.
[0092] The input system is used to manage programs for input devices. For example, the input system can determine input operations such as mouse click operations, keyboard input operations, and touch swipes.
[0093] The window manager is used to manage window programs. The window manager can obtain the display screen size, determine whether there is a status bar, lock the screen, capture the screen, etc.
[0094] The activity manager is used to manage the life cycles of various applications and the navigation back function. It is responsible for creating the main thread of Android and maintaining the life cycles of various applications.
[0095] The resource manager provides various resources for applications, such as localized strings, icons, pictures, layout files, video files, etc.
[0096] The phone manager is used to manage mobile device functions, including: mobile phone call status, obtaining phone information (device, SIM card, network information), monitoring the phone status, and calling the phone dialer to make a call.
[0097] The view system includes visible controls, such as controls for displaying text, controls for displaying pictures, etc. The view system can be used to build applications. The display interface can be composed of one or more views. For example, a display interface including a text message notification icon can include a view for displaying text and a view for displaying pictures.
[0098] The notification manager enables applications to display notification information in the status bar. It can be used to convey notification-type messages, which can disappear automatically after a short stay without user interaction. For example, the notification manager is used to notify that the download is complete, message reminders, etc. The notification manager can also be a notification that appears in the system top status bar in the form of a chart or scroll bar text, such as a notification of a background-running application, or a notification that appears on the screen in the form of a dialog window. For example, prompting text information in the status bar, emitting a prompt sound, vibrating the electronic device, flashing the indicator light, etc.
[0099] Android runtime includes a core library and a virtual machine. Android runtime is responsible for the scheduling and management of the Android system.
[0100] The core library contains two parts: one part is the functional functions that need to be called by the Java language, and the other part is the core library of Android.
[0101] The application layer and the application framework layer run in the virtual machine. The virtual machine executes the Java files of the application layer and the 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] The system libraries can include multiple functional modules. For example: surface manager, Media Libraries, 3D graphics processing library (e.g., OpenGL ES), 2D graphics engine (e.g., SGL), etc.
[0103] The surface manager is used to manage the display subsystem and provides the fusion of 2D and 3D layers for multiple applications.
[0104] The Media Libraries support the playback and recording of multiple common audio and video formats, as well as static image files, etc. The Media Libraries can support multiple audio and video coding formats, such as: MPEG2, H.262, MP3, AAC, AMR, JPG, PNG, etc.
[0105] The 3D graphics processing library is used to implement 3D graphics drawing, image rendering, synthesis, and layer processing, etc. The 2D graphics engine is a drawing engine for 2D drawing.
[0106] The kernel layer is the layer between the hardware and the software. The kernel layer at least includes a camera driver, a sensor driver, and a display driver, etc.
[0107] It should be noted that although the embodiments of the present application are described with the Android system, the principle of the note search method is equally applicable to electronic devices with operating systems such as iOS or Windows.
[0108] The following uses specific embodiments to detail the technical solution of the present application and how the technical solution of the present application solves the above technical problems. These several specific embodiments can be implemented independently or in combination with each other. For the same or similar concepts or processes, they may not be repeated in some embodiments.
[0109] For ease of understanding, the embodiments of the present application use a mobile phone as an electronic device. First, in combination with some user interfaces shown in the embodiments of the present application, the application scenarios in the note creation process will be described.
[0110] Exemplarily, multiple application programs can be installed on the electronic device, and icons of the installed multiple application programs are displayed on the desktop of the electronic device, such as icons of application programs like file management, email, weather, calculator, clock, recorder, music, notes, etc. The electronic device can receive an operation input by the user on the icon of the notes application, such as a click operation, etc. In response to the operation input by the user on the icon of the notes application, the electronic device starts the notes application and displays the first application interface 301 as shown in (a) of Figure 3 Figure 301 shown in (a) of
[0111] The first application interface 301 can display the notes already entered by the user. For example, the notes already entered by the user include Note 1, Note 2, Note 2, Note 4, etc. The note creation time or note editing time of each note can also be displayed around each note. Moreover, the first application interface 301 further includes a first search box 3011 for searching notes, a note addition control 3012 for creating new notes, a control for displaying notes, a control for displaying to-do items, etc.
[0112] The electronic device can receive a touch operation by the user on the note addition control 3012, such as a click operation, and in response to the touch operation on the note addition control 3012, display the second application interface 302 as shown in (b) of Figure 3 Figure 302 shown in (b) of
[0113] The electronic device can receive a touch operation by the user on the text note selection control, such as a click operation, and in response to the touch operation on the text note selection control, display the third application interface 303 as shown in (c) of Figure 3 Figure 303 shown in (c) of
[0114] The electronic device can receive a touch operation by the user on the addition control 3032, such as a click operation, and in response to the touch operation on the addition control 3032, display as shown in Figure 3The fourth application interface 304 shown in (d) therein. The fourth application interface 304 includes an editing area for recording note content, a control 3031 for indicating the completion of note editing, a control for withdrawal, a control for canceling withdrawal, a control for exiting note editing, a style control, a checklist control, an addition control 3032, a recording control 3033, a control for selecting a picture from a gallery, a photographing control, a handwriting control, a table control, a hyperlink control, an import control, a document scanning control, a table extraction control, a card and certificate collection control, etc.
[0115] The recording control 3033 is used to add a recording to the note; the control for selecting a picture from a gallery and the photographing control can be used to add a picture to the note; the handwriting control is used to add handwriting content to the note; the table control is used to add a table to the note; the document scanning control is used to add a document to the note; the card and certificate collection control is used to add card and certificate information, such as ID card information, etc., to the note.
[0116] Exemplarily, the electronic device can receive a touch operation of the user on the recording control 3033 in the third application interface 303 or the recording control 3033 in the fourth application interface 304, such as a click operation, and in response to the touch operation on the recording control 3033, display, as shown in Figure 4 the fifth application interface 401 shown in (a) therein, and the fifth application interface 401 is used to display the recording added to the note.
[0117] Exemplarily, the electronic device can receive a touch operation of the user on the handwriting control in the fourth application interface 304, such as a click operation, and in response to the touch operation on the handwriting control, display, as shown in Figure 4 the sixth application interface 402 shown in (b) therein, and the sixth application interface 402 is used to display the handwriting content added to the note.
[0118] Exemplarily, the electronic device can receive a touch operation of the user on the control for selecting a picture from a gallery or the photographing control in the fourth application interface 304, such as a click operation, and in response to the touch operation on the control for selecting a picture from a gallery or the photographing control, display, as shown in Figure 4 the seventh application interface 403 shown in (c) therein, and the seventh application interface 403 is used to display the picture added to the note.
[0119] When the user finishes editing the content of the note, a touch operation, such as a click operation, can be performed on the control 3031 for indicating the completion of note editing. The electronic device receives the touch operation of the user on the control 3031 for indicating the completion of note editing, and in response to the touch operation, stores the note.
[0120] The above is for the scenario of note creation. Of course, for some notes that the user has already created in the note application, the user may need to edit the notes. At this time, the user can click on the title of the note to be edited. In response to the user's touch operation on the selected note title, the electronic device can display an interface carrying the note content corresponding to the note title, and this interface can be called a note editing interface. The user can add recordings, handwritten content, pictures, tables, etc. to the note to be edited on the note editing interface.
[0121] Exemplarily, Figure 5 is a schematic diagram of module interaction for note index creation provided by an embodiment of the present application. Refer to Figure 5 as shown. The electronic device includes a note application, a search middle platform, and a handwriting recognition module. The handwriting recognition module is also located in the application layer of the electronic device. The note application can include a detail editing display interface, a data storage module, and an index creation module. The process of creating the note index can specifically include the following steps:
[0122] S501, the detail editing display interface receives the user's editing operation on the fourth note, and this editing operation includes adding handwritten content to the fourth note.
[0123] The newly created note or the note when re - editing an already created note can be referred to as the fourth note. The user can perform an editing operation on the fourth note on the detail editing display interface, such as adding handwritten content to the fourth note on the detail editing display interface, so that the detail editing display interface receives the user's editing operation on the fourth note. Exemplarily, the detail editing display interface can be the sixth application interface 402 shown in (b) of Figure 4 .
[0124] S502, in response to the editing operation on the fourth note, the detail editing display interface sends 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 detail editing display interface.
[0126] In response to the user's editing operation on the fourth note, the detail editing display interface sends 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 handwriting recognition result corresponding to the handwritten content to the detail editing display interface.
[0127] It can be understood that when the user does not add handwritten content to the fourth note on the detail editing display interface, the steps corresponding to S502 and S503 above may not be executed either.
[0128] S504, the detail editing display interface receives the user's save operation on the edited fourth note.
[0129] When the user finishes the editing operation on the fourth note in the detail editing display interface, the user can perform a touch operation on the save control in the detail editing display interface. The save control can be the control 3031 for indicating the completion of note editing. In this way, the detail editing display interface can receive the save operation of the edited fourth note from the user. This save operation can also be referred to as the fifth operation.
[0130] S505, in response to the save operation of the edited fourth note, the detail 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 the detail editing display interface receives the save operation of the edited fourth note from the user, in response to the save operation of the edited fourth note, the detail editing display interface sends a text index insertion request corresponding to the fourth note to the index creation module.
[0132] Among them, the text index insertion request includes the note data corresponding to the fourth note, and the note data corresponding to the fourth note may include the handwriting recognition result corresponding to the handwritten content added in the fourth note.
[0133] In some embodiments, the note data of each note may include a note table (NoteDao) and an attachment table (AttachDao).
[0134] Exemplarily, the note table of a note may include the following fields:
[0135] Field Name Field Description Uuid Unique Note Identifier Title Note Title Type Note Type: Handwritten Note, Text Note, etc. Has_attachment Whether Attachment is Included Delete_flag Whether Deleted Create_time Note Creation Time, for List Sorting Modify_time Note Editing Time, for List Sorting Lock_status Whether Note is Locked Is_top Whether Note is Pinned, for List Sorting html_content HTML Content of Note Body, including Interface Layout Information Search_content Search Retrieval Content Folder_uuid Note Folder Information
[0136] Among them, the Uuid field in the note table is used to indicate the unique identifier of the note, which can also be called the note identifier; the Title field is used to indicate the note title of the note; the Type field is used to indicate the note type of the note, such as the note type can be a handwritten note or a text note; the Has_attachment field is used to indicate whether the note contains attachments; the Delete_flag field is used to indicate whether the note is deleted; the Create_time field is used to indicate the note creation time corresponding to the note, which can be used when the user searches for multiple notes and sorts and displays the searched multiple notes in the note list; the Modify_time field is used to indicate the note editing time corresponding to the note, which can be used when the user searches for multiple notes and sorts and displays the searched multiple notes in the note list; the Lock_status field is used to indicate whether the note is a locked note; the Is_top field is used to indicate whether the note is a pinned note. If a note is a pinned note, it is ranked first when displayed in the note list; the html_content field is used to indicate the hypertext markup language (Hypertext markup Language) of the note body language, HTML) content, which can include the interface layout information of the note content; the Search_content field is used to indicate the search retrieval content; the Folder_uuid field is used to indicate the folder information where the note is located.
[0137] The attachment table of a note is used to record the relevant information of the attachment. Exemplarily, the attachment table of a note may include the following fields:
[0138]
[0139]
[0140] Among them, the Uuid field in the attachment table 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 represent the attachment location and is used for the interface display of the note; the Mimetype field is used to represent the attachment type and is used to distinguish the attachment types of the attachments added to the note, such as pictures, 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 represent the attachment storage name; the Content_uri field is used to represent the attachment storage location; the Display_name field is used to represent the attachment display name; the size field is used to represent the attachment size; the Send_mms field is used to represent whether the attachment has created a search index; 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 corresponding to the fourth note sent by the details editing display interface, 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. Specifically, the index creation module generates the text index content corresponding to the fourth note according to the content included in the note table and the attachment table corresponding to the fourth note.
[0143] Exemplarily, the text index content corresponding to the note may include the following fields:
[0144] Field Name Field Description Identifier Note UUID, for Identifying a Unique Note noteId Empty noteType Used to Identify Note Type: Handwritten Note, Text Note noteCategory Note Label, for Deleted Notes, Locked Notes, etc. noteAttachInfo Note Classification, for Classification Search noteModifiedTime Note Modification Time, for Judging Index Update noteSearchContent Body Content, for Locked Notes Title Note Title, for Title Search Description Body Content, for Non-Locked Notes File_path Empty Ocr Empty Lable Empty Content type NOTEPDA, indicating Text Type Index
[0145] Among them, the Identifier field in the text index content is used to represent the note uuid, which is used to identify a unique note. The content included in the Identifier field in the text index content can be generated according to the content included in the Uuid field in the note table. The noteId field in the text index content is an empty field, and no identifier is filled in the noteId field. The noteType field in the text index content is used to identify the note type of the note. For example, the note type can be a handwritten note or a text note, etc. The content included in the noteType field can be generated according to the content included in the Type field in the note table. The noteCategory field in the text index content is used to represent the note label of the note, which is used to represent deleted notes, locked notes, etc. The content included in the noteCategory field can be generated according to the content included in the Delete_flag field or the Lock_status field in the note table. The noteAttachInfo field in the text index content is used to represent the note classification and is used when searching for note classifications. The content included in the noteAttachInfo field can be generated according to the content included in the Mimetype field in the attachment table. For example, when the attachment in the note is a table, the content included in the noteAttachInfo field can be "table"; when the attachment in the note is an audio recording, the content included in the noteAttachInfo field can be "record"; when the attachment in the note is a video, the content included in the noteAttachInfo field can be "video"; when the attachment in the note is a card or certificate, the content included in the noteAttachInfo field can be "card"; when the attachment in the note is a document, the content included in the noteAttachInfo field can be "scan".
[0146] The noteModifiedTime field in the text index content is used to represent the note modification time and can be used to determine whether the index is updated. The content included in the noteModifiedTime field can be generated based on the content included in the Modify_time field in the note table. The noteSearchContent field in the text index content is used to represent the body content of the note and is used when the note is a locked note. The content included in the noteSearchContent field can be generated based on the content included in the Search_content field in the note table and the content included in the Attachment_details in the attachment table. The Title field in the text index content is used to represent the note title, which can be used to search for the search term entered by the user in the title. The content included in the Title field in the text index content can be generated based on the content included in the Title field in the note table. The Description field in the text index content is used to represent the body content of the note and is used when the note is an unlocked note. The content included in the Description field can be generated based on the content included in the Search_content field in the note table and the content included in the Attachment_details in the attachment table. The File_path field, Ocr field, and Lable field in the text index content are all empty fields and do not fill any identifiers in the fields. The content included in the Content type field in the text index content can be NOTEPDA, indicating that the text index content is a text type index.
[0147] S507, the index creation module sends the text index content corresponding to the fourth note to the search middle 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 middle platform to insert the text index content corresponding to the fourth note in the search middle platform.
[0149] S508, the details editing display interface saves the note data corresponding to the fourth note to the data storage module in response to the save operation of the edited fourth note.
[0150] After receiving the save operation of the edited fourth note by the user, the details editing display interface saves the note data corresponding to the fourth note to the data storage module in response to the save operation of the edited fourth note. Among them, the note data corresponding to the fourth note also includes the above-mentioned note table and attachment table.
[0151] It should be noted that there is no fixed sequence between the steps corresponding to S508 and the steps corresponding to S505 above, and they can be executed synchronously.
[0152] S509. The data storage module sends a picture index insertion request corresponding to the fourth note to the index creation module; the picture 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 may send a picture index insertion request corresponding to the fourth note to the index creation module. Among them, the picture 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 picture index content corresponding to the fourth note based on the note data corresponding to the fourth note in the picture index insertion request.
[0155] After receiving the picture index insertion request corresponding to the fourth note sent by the data storage module, the index creation module constructs the picture index content corresponding to the fourth note based on the note data corresponding to the fourth note in the picture index insertion request. Specifically, the index creation module generates the picture index content corresponding to the fourth note according to the content included in the note table and attachment table corresponding to the fourth note.
[0156] Exemplarily, the picture index content corresponding to the note may include the following fields:
[0157] Field Name Field Description Identifier Attachment UUID, for Identifying a Unique Attachment noteId Note UUID Associated with the Attachment, for Associating Notes noteType Empty noteCategory Empty noteAttachInfo Empty noteModifiedTime Empty noteSearchContent Empty Title Empty Description Empty File_path Image Location Ocr Filled with the Text Recognized from the Image in this Field. Lable Filled with this Field after Image Recognition Content type PHOTO, indicating Image Type Index
[0158] Among them, the Identifier field in the picture index content is used to represent the attachment uuid, which is used to identify a unique attachment. The content included in the Identifier field in the picture index content can be generated according to the content included in the Uuid field in the attachment table. The noteId field in the picture index content represents the note uuid associated with the attachment, which is used to associate the note. The content included in the noteId field in the picture index content can be generated according to the content included in the Parent_uuid field in the attachment table.
[0159] The noteType field, noteCategory field, noteAttachInfo field, noteModifiedTime field, noteSearchContent field, Title field, and Description field in the picture index content are all empty fields, and no identification is filled in the fields.
[0160] The File_path field in the picture index content is used to represent the picture location. The content included in the File_path field in the picture index content can be generated based on the content included in the Uuid field and the Content_uri field in the attachment table. The Ocr field in the picture index content is used to fill this field after the text in the picture is recognized. The Lable field in the picture index content is used to fill this field after the natural semantic recognition of the things in the picture. For example, a picture with a tiger can be recognized as relevant labels such as tiger and animal. The content included in the Content type field in the picture index content can be PHOTO, indicating that the picture index content is a picture type index.
[0161] S511, the index creation module sends the picture index content corresponding to the fourth note to the search middle platform.
[0162] After constructing the picture index content corresponding to the fourth note, the index creation module sends the picture index content corresponding to the fourth note to the search middle platform to insert the picture index content corresponding to the fourth note in the search middle platform.
[0163] In this way, when a newly created or edited note includes both text content and picture content, after inserting the index content of the note in the search middle platform in the above manner, the search middle platform will save the index content of this note, and the index content of this note includes text index content and picture index content.
[0164] It should be noted that after the details editing display interface of the embodiment of the present application receives the save operation of the user on the edited fourth note, it can synchronously execute the steps corresponding to S505 and the steps corresponding to S508, rather than directly sending a picture index insertion request corresponding to the fourth note to the index creation module. The reason is that when constructing the picture index content, it is necessary to recognize the text in the picture and perform natural semantic recognition on the picture, and because the content of the picture is relatively large and time-consuming to save, etc., save the note data first and then trigger the insertion of the picture index content. In this way, in scenarios such as when the system of the electronic device is abnormal or the electronic device is restarted, for the same note, the note data of this note is stored in the data storage module, and the index content of this note is also stored in the search middle platform. And if the picture index content is inserted without saving the note data, in scenarios such as when the system of the electronic device is abnormal or the electronic device is restarted, for the same note, it may occur that the note data of this note is not stored in the data storage module, while the index content of this note is stored in the search middle platform.
[0165] In some scenarios, in addition to creating new notes within the note application, 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, and the data storage module returns a note identifier to the third-party application; then, the third-party application sends the note identifier to the index creation module, and the index creation module obtains the note data from the data storage module based on the note identifier and constructs text index content and / or picture index content according to the note data to send the text index content and / or picture index content to the search middleware platform.
[0166] Exemplarily, Figure 6 is a schematic flow diagram of note index creation provided by an embodiment of the present 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 on the edited fourth note.
[0168] S602, in response to the save operation on 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 processes of the steps corresponding to S601 and S602 are similar to the implementation processes of the steps corresponding to S504 and S505 above. To avoid repetition, they will not be elaborated 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 fills the noteSearchContent field.
[0172] S605, when the fourth note is an unlocked note, the index creation module fills the Description field.
[0173] The index creation module can determine whether the fourth note is a locked note according to the content included in the Lock_status field in the note table of the fourth note.
[0174] When the fourth note is a locked note, when constructing the text index content, the index creation module can fill the corresponding content in the noteSearchContent field in the text index content; when the fourth note is an unlocked note, when constructing the text index content, the index creation module can fill the corresponding content in the Description field in the text index content.
[0175] Therefore, when constructing the text index content, the index creation module needs to fill different fields according to whether the note is a locked note. In this way, when searching for notes through the global search module on the negative first screen of the electronic device, the global search module can only search for non-locked notes; while when searching for notes within the note application, if the current state is unlocked, the content of the 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 an attachment, the index creation module fills 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 an attachment based on the content included in the Has_attachment field in the note table of the fourth note.
[0179] When the fourth note contains an attachment, when constructing the text index content, the index creation module can fill the corresponding content in the noteAttachInfo field in the text index content according to the content included in the Mimetype field in the attachment table of the fourth note.
[0180] S608, the index creation module sends the text index content corresponding to the fourth note to the search middleware.
[0181] In this way, 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 middleware.
[0182] When the fourth note does not contain an attachment, there is no need to fill the corresponding content in the noteAttachInfo field in the text index content, and 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 middleware.
[0183] S609, the details editing display interface saves the note data corresponding to the fourth note to the data storage module in response to the save operation of the edited fourth note.
[0184] S610, the data storage module sends a picture index insertion request corresponding to the fourth note to the index creation module.
[0185] S611, the index creation module constructs the picture index content corresponding to the fourth note based on the note data corresponding to the fourth note in the picture index insertion request.
[0186] S612, the index creation module sends the picture index content corresponding to the fourth note to the search middle platform.
[0187] The implementation processes of the steps corresponding to S609 to S612 are similar to those of the steps corresponding to S508 to S511 above. To avoid repetition, they will not be elaborated here.
[0188] The above combination Figures 3 to 6 , has described the note index creation process provided by the embodiments of the present application. Next, the processes of classification search, word segmentation search, pinyin search, and highlighting of search terms provided by the embodiments of the present application will be described.
[0189] For ease of understanding, in the embodiments of the present application, a mobile phone is used as the electronic device. First, some user interfaces shown in the embodiments of the present application will be combined to illustrate the application scenarios of classifying and searching notes.
[0190] Exemplarily, the electronic device may display a first application interface 301 as shown in (a) of Figure 7 . The first application interface 301 includes a first search box 3011 for searching notes.
[0191] The electronic device may receive a touch operation of the user on the first search box 3011, such as a click operation, and in response to the touch operation on the first search box 3011, display an eighth application interface 701 as shown in (b) of Figure 7 . Among them, the eighth application interface 701 includes a second search box 7011 for searching notes and multiple classification search options 7012. The multiple classification search options 7012 may include a table search option, a document search option, a recording search option, a video search option, a card and certificate search option, etc.
[0192] The table search option is used to search notes whose attachment type of the included attachment is a table. The document search option is used to search notes whose attachment type of the included attachment is a document. The recording search option is used to search notes whose attachment type of the included attachment is a recording. The video search option is used to search notes whose attachment type of the included attachment is a video. The card and certificate search option is used to search notes whose attachment type of the included attachment is a card and certificate. And the all search option can be used to search notes of all attachment types.
[0193] Exemplarily, the electronic device may receive a touch operation of the user on the card and certificate search option, such as a click operation, and in response to the touch operation on the card and certificate search option, display as shown in Figure 7The ninth application interface 702 shown in (c) thereof. Among them, the ninth application interface 702 can display the searched notes containing cards and certificates. For example, 2 notes containing cards and certificates can be searched from all the notes stored in the note application, and the notes containing cards and certificates can be identity card information.
[0194] Exemplarily, the electronic device can receive a touch operation of the user on the recording search option, such as a click operation, and in response to the touch operation on the recording search option, display as Figure 7 the tenth application interface 703 shown in (d) thereof. Among them, the tenth application interface 703 can display the searched notes containing recordings. For example, 3 notes containing recordings can be searched from all the notes stored in the note application.
[0195] Of course, the user can also perform a touch operation on the video search option to search for notes containing videos from all the notes stored in the note application; or, the user can also perform a touch operation on the document search option to search for notes containing documents from all the notes stored in the note application; the user can also perform a touch operation on the table search option to search for notes containing tables from all the notes stored in the note application.
[0196] Exemplarily, Figure 8 This is a schematic diagram of module interaction for classifying and searching notes provided by an embodiment of the present application. Referring to Figure 8 as shown, the electronic device includes a note application. The note application can include a list display interface, a data storage module, and an index query module. The process of classifying and searching notes can specifically include the following steps:
[0197] S801, the list display interface receives a first operation input by the user on the target classification search option.
[0198] S802, in response to the first operation input on the target classification 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 classification search option.
[0199] The electronic device can display a first interface of the note application. The first interface can be the eighth application interface 701 shown in (b) thereof, and the first interface can belong to the list display interface. Figure 7 Among them, the first interface includes multiple classification search options, such as a table search option, a document search option, a recording search option, a video search option, and a card and certificate search option, etc.
[0200]
[0201] The list display interface can receive a first operation input by the user for a target classification search option. The first operation is an operation input for the target classification search option among multiple classification search options included in the first interface, and the target classification search option can be any one of the multiple classification search options.
[0202] Then, in response to the first operation input by the user for the target classification search option, the list display interface sends a first search request to the index query module. Among them, the first search request includes the attachment type indicated by the target classification search option.
[0203] For example, the first operation can be a touch operation on the card and certificate search option, and the first search request includes the attachment type indicated by the card and certificate search option; or, the first operation can be a touch operation on the recording search option, and the first search request includes the attachment type indicated by the 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 sent by the list display interface, the index query module sends the first search request to the data storage module. Among them, the first search request includes the attachment type indicated by the target classification 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. Among them, the attachment type of the attachments included in the first note is the attachment type indicated by the target classification search option.
[0208] Specifically, the data storage module checks whether the content included in the Mimetype field in the attachment table of each stored note data matches the attachment type indicated by the target classification search option included in the first search request, and determines the note data whose Mimetype field content matches the attachment type indicated by the target classification search option as the note data corresponding to the first note. Among them, 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, in the case where 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] Among them, the first sorting method is used to sort according to the note creation time or the note editing time.
[0212] One way is to sort the note data corresponding to multiple first notes according to the content included in the Create_time field in the note table of each first note. The first note with a longer note creation time from the current time is sorted later, and the first note with a shorter note creation time from the current time is sorted earlier.
[0213] Another way is to sort the note data corresponding to multiple first notes according to the content included in the Modify_time field in the note table of each first note. The first note with a longer note editing time from the current time is sorted later, and the first note with a shorter note editing time from the current time is sorted earlier.
[0214] S807, the index query module returns the note data corresponding to the sorted multiple first notes to the list display interface.
[0215] S808, the list display interface displays multiple first notes based on the note data corresponding to the sorted multiple first notes.
[0216] Of course, after receiving the note data corresponding to multiple first notes returned by 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 the multiple first notes to the list display interface, so that the list display interface displays multiple first notes based on the note data corresponding to the multiple first notes.
[0217] Or, when there is one first note returned by the data storage module to the index query module, the index query module does not need to execute the steps corresponding to S806 above, and directly returns the note data corresponding to this one first note to the list display interface, and the list display interface displays the first note based on the note data corresponding to this one first note.
[0218] It should be noted that Figure 7 and Figure 8 The corresponding scenarios are for the scenario of classified search within the note application and no search term is entered in the search box included in the first interface. The search box included in the first interface can be the second search box 7011 in the eighth application interface 701 shown in (b) of Figure 7 Of course, the embodiments of the present application can also perform classified search and search term search on notes.
[0219] Exemplarily, the electronic device can display as Figure 9The first application interface 301 shown in (a) in [reference], the first application interface 301 includes a first search box 3011 for searching notes.
[0220] The electronic device can receive a touch operation of the user on the first search box 3011, such as a click operation, and in response to the touch operation on the first search box 3011, display the eighth application interface 701 shown in (b) in [reference]. Among them, the eighth application interface 701 includes a second search box 7011 for searching notes and a plurality of classification search options 7012. The plurality of classification search options 7012 may include a table search option, a document search option, a recording search option, a video search option, a card and certificate search option, etc. Figure 9
[0221] The electronic device can receive the search term input by the user in the second search box 7011, and in response to the operation of inputting the search term in the second search box 7011, display the eleventh application interface 901 shown in (c) in [reference]. Among them, the eleventh application interface 901 is used to display the notes containing the search term that are searched. Figure 9
[0222] For example, the search term input by the user in the second search box 7011 may be "tiger". 3 notes containing the character "tiger" and 2 pictures containing "tiger" are searched from all the notes stored in the note application, and these 3 notes containing the character "tiger" and these 2 pictures containing "tiger" are displayed in the eleventh application interface 901.
[0223] Then, the electronic device can also receive a touch operation of the user on the table search option among the plurality of classification search options 7012 included in the eleventh application interface 901, such as a click operation, and in response to the touch operation on the table search option, display the twelfth application interface 902 shown in (d) in [reference]. The twelfth application interface 902 can display the notes that contain both the search term "tiger" and a table searched from all the notes stored in the note application. For example, 1 note that contains both the search term "tiger" and a table can be searched from all the notes stored in the note application. Figure 9
[0224] Figure 9 Figure 9 The corresponding scenario is to first input the search term in the second search box 7011, and after displaying the notes containing the search term, then select the target classification search option from the plurality of classification search options 7012 to search for the notes that contain the search term and the target classification search option from all the notes stored in the note application.
[0225] Of course, it is also possible to first select a target classification search option from multiple classification search options 7012, and after displaying the notes containing the target classification search option, enter a search term in the second search box 7011 to search for notes containing the search term and the target classification search option from all the notes stored in the note application.
[0226] Taking the scenario where a target classification search option is first selected from multiple classification search options 7012 and then a search term is entered in the second search box 7011 as an example. Exemplarily, Figure 10 This is a schematic diagram of module interactions for classifying and searching notes and searching by search terms provided by an embodiment of the present application. Refer to Figure 10 As shown, the electronic device includes a note application and a search middleware platform. The note application may include a list display interface, a data storage module, and an index query module. The process of classifying and searching notes and searching by search terms may specifically include the following steps:
[0227] S1001, the list display interface receives a first operation input by the user for the target classification search option.
[0228] S1002, in response to the first operation input for the target classification 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 classification search option.
[0229] S1003, the index query module sends the first search request to the data storage module.
[0230] S1004, based on the first search request, the data storage module searches for the note data corresponding to the first note from the stored note data.
[0231] S1005, the data storage module returns the note data corresponding to the first note to the index query module.
[0232] S1006, in the case where 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 multiple first notes to the list display interface.
[0234] S1008, the list display interface displays the multiple first notes based on the sorted note data corresponding to the multiple first notes.
[0235] The implementation processes of the steps corresponding to S1001 to S1008 are similar to the implementation processes of the steps corresponding to S801 to S808 above. To avoid repetition, they will not be elaborated here.
[0236] S1009, The list display interface receives the search term 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 classification search option.
[0238] After the list display interface displays the first note, the list display interface can also receive the search term entered by the user in the search box included in the first interface. The search box included in the first interface can be the second search box 7011. In response to the operation of entering a search term 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 term and the attachment type indicated by the target classification search option.
[0239] S1011, The index query module sends the eighth search request to the search middleware platform.
[0240] S1012, The search middleware platform searches and obtains the third index content from the stored index content.
[0241] The search middleware platform searches and obtains the third index content from all the index content stored in the search middleware platform according to the search term in the eighth search request and the attachment type indicated by the target classification search option. Among them, the third index content is the index content including the search term and the attachment type indicated by the target classification search option.
[0242] Specifically, when the note application is currently in the locked state, the search middleware platform can query the index content including the search term in the Title field of the text index content of all notes, the Description field of the text index content, the Ocr field of the picture index content, and the content included in the Lable field of the picture index content, and search for the index content of the attachment type indicated by the target classification search option from the content included in the noteAttachInfo field of the text index content of all notes.
[0243] When the note application is currently in the unlocked state, the search middleware platform can query the index content including the search term in the Title field of the text index content of all notes, the Description field of the text index content, the noteSearchContent field of the text index content, the Ocr field of the picture index content, and the content included in the Lable field of the picture index content, and search for the index content of the attachment type indicated by the target classification search option from the content included in the noteAttachInfo field of the text index content of all notes.
[0244] When the indexed content of a note contains both the search term and the attachment type indicated by the target classification search option, determine the indexed content of this note as the third indexed content. The third indexed content includes text indexed content and / or picture indexed content.
[0245] S1013, The search middle platform returns the third indexed content 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 indexed content; the ninth search request includes the third note identifier.
[0247] The index query module can extract the third note identifier from the third indexed content to generate the ninth search request and send the ninth search request to the data storage module.
[0248] Exemplarily, the third note identifier may include: the note identifier included in the Identifier field in the text indexed content, the note identifier included in the noteId field in the picture indexed content, and the attachment identifier included in the Identifier in the picture indexed 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 the note identifier that matches the third note identifier.
[0250] Specifically, the data storage module can check whether the note identifier included in the Uuid field of the note table in each of the stored note data matches the note identifier included in the Identifier field in the text indexed content, and determine the note corresponding to the matching note data as the fifth note.
[0251] And, the data storage module can check whether the note identifier included in the Parent_uuid field of the attachment table in each of the stored note data matches the note identifier included in the noteId field in the picture indexed 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 note identifier included in the Uuid field of the attachment table in each of the stored note data matches the attachment identifier included in the Identifier in the picture indexed content, and determine the note corresponding to the matching note data as the fifth note.
[0253] Among them, the note data corresponding to the fifth note includes the note table and the 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 sorts out 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 picture and the note data corresponding to the text, the note data corresponding to the picture and the note data corresponding to the text can be merged.
[0257] Moreover, in the case where there are multiple fifth notes, the index query module can sort the note data corresponding to the multiple fifth notes according to a preset sorting method.
[0258] Among them, 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 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 picture position.
[0259] For example, the fifth note with a longer note creation time from the current time is sorted more backward, and the fifth note with a shorter note creation time from the current time is sorted more forward. Or, the fifth note with a longer note editing time from the current time is sorted more backward, and the fifth note with a shorter note editing time from the current time is sorted more forward. The sorting with the search term in the title position is more forward than the sorting with the search term in the body position, and the sorting with the search term in the body position is more forward than the sorting with the search term in the picture position.
[0260] S1018, the index query module returns the sorted 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 sorted note data corresponding to the fifth note.
[0262] Exemplarily, Figure 11 This is a schematic flowchart of the process for classifying and searching notes and searching for search terms provided by the embodiments of the present application. Refer to Figure 11 As shown, the process of classifying and searching notes and searching for search terms can specifically include the following steps:
[0263] S1101, receive the first operation input by the user for the target classification search option.
[0264] S1102, determine whether a search term is input 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 classification search option.
[0266] The list display interface can determine whether the user has entered a search term in the search box on the first interface. When no search term is entered in the search box, the actual corresponding scenario is the scenario of conducting a classification search within the note application and not entering a search term in the search box included in the first interface. For the specific steps, reference can be made to the steps corresponding to S801 to S8085 above, which will not be elaborated here.
[0267] S1104. When a search term is entered in the search box, determine whether the note application is in the unlocked state.
[0268] S1105. When the note application is in the unlocked state, query the content included in the noteSearchContent field.
[0269] S1106. When the note application is in the locked state, query the content included in the Description field.
[0270] When a search term is entered in the search box, the list display interface can determine whether the note application is in the unlocked state.
[0271] When the note application is in the unlocked state, the list display interface can send the search term, the attachment type indicated by the target classification search option, and the instruction to query the noteSearchContent field to the index query module, so that when the index query module queries the third index content from the search middleware, it can query from the content included in the noteSearchContent field and the Description field in the text index content of all notes stored in the search middleware.
[0272] When the note application is in the locked state, the list display interface can send the search term, the attachment type indicated by the target classification search option, and the instruction to query the Description field to the index query module, so that when the index query module queries the third index content from the search middleware, it can query from the content included in the Description field in the text index content of all notes stored in the search middleware.
[0273] S1107. Search for the third index content that contains the search term and the attachment type indicated by the target classification search option.
[0274] The implementation method of this step is similar to the implementation method of the step corresponding to S1012 above. To avoid repetition, it will not be elaborated here.
[0275] S1108, Determine whether the third index content is searched.
[0276] The index query module can determine whether the third index content is searched by the search middle platform. When the index query module receives the third index content returned by the search middle platform, it determines that the search middle platform has searched the third index content; when the index query module has not received the third index content returned by the search middle platform within the preset duration, it determines that the search middle platform has not searched the third index content.
[0277] S1109, When the third index content is not searched, obtain the notes containing the search term and the attachment type indicated by the target classification search option from the data storage module.
[0278] When the third index content is not searched, the index query module can send a search request to the data storage module. The search request can include the search term and the attachment type indicated by the target classification search option. The data storage module can search for the notes containing the search term and the attachment type indicated by the target classification search option from the note data of all the stored notes and return them to the index query module.
[0279] S1110, When the third index content is searched, determine whether a picture is searched.
[0280] S1111, When a picture is searched, group the pictures according to the noteId field of the picture.
[0281] The index query module determines whether a picture is searched. When a picture is searched, according to the note identifier included in the noteId field of the picture index content in the third index content, the pictures belonging to the same note are grouped into one group.
[0282] S1112, Query the note data corresponding to the fifth note from the data storage module according to the noteId of the picture.
[0283] The index query module can send the note identifier included in the noteId field of the picture index content to the data storage module. 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 according to the note identifier included in the noteId field of the picture index content, determine the note corresponding to the matching note data as the fifth note, and return the note data corresponding to the fifth note to the index query module.
[0284] S1113, When a picture is not searched, query the note data corresponding to the fifth note from the data storage module according to the Identifier field of the note.
[0285] When no picture is searched, the index query module can send the note identifier included in the Identifier field in the text index content to the data storage module. The data storage module can check whether the note identifier included in the Uuid field of the note table in each stored note data matches, determine the note corresponding to the matching note data as the fifth note, and return the note data corresponding to the fifth note to the index query module.
[0286] S1114, perform data merging on the note data corresponding to the picture and the note data corresponding to the text.
[0287] S1115, sort the note data corresponding to multiple notes according to a preset sorting method.
[0288] The implementation manners of the steps corresponding to S1114 and S1115 are similar to the implementation manner of the step corresponding to S1017 above. To avoid repetition, they will not be described in detail here.
[0289] S1116, return the note data corresponding to multiple sorted notes and the search term to the list display interface.
[0290] After the search query module queries the note data of the fifth note or obtains the note containing the search term and the attachment type indicated by the target classification search option from the data storage module, it can extract the search term in each note. The search query module can send the note data corresponding to multiple sorted notes and the search term to the list display interface together.
[0291] S1117, display the note.
[0292] Exemplarily, after the step corresponding to S1103 is executed and the first note is searched, the note displayed by S1117 can be the first note; or, after the step corresponding to S1116 is executed, the note displayed by S1117 can be the fifth note, or the note containing the search term and the attachment type indicated by the target classification search option obtained from the data storage module.
[0293] In this way, all qualified notes can be searched through one query.
[0294] For ease of understanding, in the embodiments of the present application, a mobile phone is used as the electronic device. First, in combination with some user interfaces shown in the embodiments of the present application, the application scenarios of word segmentation search for notes will be described.
[0295] Exemplarily, the electronic device can display the eighth application interface 701 as shown in (a) of Figure 12 , and the eighth application interface 701 includes a second search box 7011 for searching notes.
[0296] The electronic device can receive multiple search terms entered by the user in the second search box 7011 and spaced apart from each other, and in response to the operation of entering multiple search terms spaced apart from each other in the second search box 7011, display the thirteenth application interface 1201 as shown in Figure 12 (b) of. The thirteenth application interface 1201 can display the notes including multiple search terms searched from all the notes stored in the note application.
[0297] For example, the multiple search terms entered by the user in the second search box 7011 and spaced apart from each other can be "mobile phone news", and the note content of the note stored in the note application can be "The news center of XX website of mobile phone is the focus of XX website...", so this searched note can be displayed on the thirteenth application interface 1201.
[0298] Exemplarily, Figure 13 This is a schematic diagram of module interaction for performing word segmentation search on notes provided by an embodiment of the present application. Refer to Figure 13 As shown, the electronic device includes a note application and a search middleware. The note application can include a list display interface, a data storage module, and an index query module. The process of performing word segmentation search on notes can specifically include the following steps:
[0299] S1301, the list display interface receives multiple search terms entered by the user in the search box and spaced apart from each other.
[0300] S1302, the list display interface, in response to a second operation of entering multiple search terms spaced apart from each other in the search box, sends a second search request to the index query module; the second search request includes multiple search terms.
[0301] The electronic device can display a first interface of the note application. The first interface can be the eighth application interface 701 as shown in Figure 12 (a) of. The first interface can belong to the list display interface. Among them, the first interface includes a search box, and the search box included in the first interface can be the second search box 7011 in the eighth application interface 701 as shown in Figure 12 (a) of.
[0302] The list display interface can receive multiple search terms entered by the user in the search box included in the first interface (such as spaced apart by spaces between multiple search terms). The list display interface, in response to a second operation of entering multiple search terms spaced apart from each other in the search box, sends a second search request to the index query module, and the second search request includes multiple search terms.
[0303] S1303. The index query module sends a third search request to the search middle platform based on the second search request. The third search request includes multiple search terms and a first search method.
[0304] The index query module can split the multiple search terms in the second search request according to their intervals to generate a third search request and send the third search request to the search middle platform.
[0305] Among them, the third search request includes multiple search terms and a first search method. The first search method is used to indicate the matching method of multiple keywords when the search middle platform searches for the first index content from the stored index content according to the multiple search terms.
[0306] S1304. The search middle platform searches for 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 middle platform searches for the first index content from all the index content stored in the search middle platform according to the multiple search terms in the third search request and according to the first search method. Among them, the first index content is the index content including multiple search terms, and the first index content includes text index content and / or picture index content.
[0308] Specifically, when the note application is currently in a locked state, the search middle platform can query the index content including the multiple search terms in the third search request from the content included in the Title field in the text index content of all notes, the Description field in the text index content, the Ocr field in the picture index content, and the Lable field in the picture index content.
[0309] When the note application is currently in an unlocked state, the search middle platform can query the index content including the multiple search terms in the third search request from the content included in the Title field in the text index content of all notes, the Description field in the text index content, 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.
[0310] In some embodiments, the first search method includes a single-character search method. The single-character search method is used to indicate that when the search middle platform searches for the first index content from the stored index content according to the multiple search terms, the multiple keywords are matched according to the principle of single-character matching.
[0311] Specifically, the search center obtains the index of each keyword in the search term according to the single-word search method; the index of each keyword is the index of the keyword in the index content to be screened, and the index content to be screened is at least one index content including the keyword in the index content stored by the search center; the search center detects whether the index of each keyword in the search term is adjacent; when the index of each keyword in the search term is adjacent, the search center determines that the search term matches successfully; when multiple search terms all match successfully, the search center obtains the first index content that matches multiple search terms from the index content to be screened.
[0312] When storing the index content of each note, the search center will store the Title field in the text index content, the Description field in the text index content, the noteSearchContent field in the text index content, the Ocr field in the image index content, and the Lable field in the image index content in the form of single words for word segmentation search.
[0313] For example, if the content of a note is "Mobile XX Network News Center is the focus of XX Network", when the search center stores the index content of the note, it can be stored in the Description field in the text index content or the noteSearchContent field in the text index content as a single word type. The index corresponding to the word "hand" is 0, the index corresponding to the word "machine" is 1, the index corresponding to the word "net" is 4, the index corresponding to the word "new" is 5, the index corresponding to the word "new" is 6, and so on.
[0314] In this way, when the user inputs multiple search terms "mobile phone" and "news" that are spaced apart from each other in the search box of the first interface, the index query module can split "mobile phone" and "news" into two search terms.
[0315] When searching for index content corresponding to "mobile phone", the search platform can first search for the index of the word "hand" in the stored index content, and then search for the index of the word "machine" in the stored index content, to detect whether the index corresponding to the word "hand" and the index corresponding to the word "machine" are adjacent in the index content of the same note.
[0316] For example, in the index content of a certain note, the index corresponding to the word "hand" is 0, and the index corresponding to the word "machine" is 1. It can be determined that the index corresponding to the word "hand" is adjacent to the index corresponding to the word "machine". In this way, it can be determined that the search term "mobile phone" is successfully matched in the index content of this note.
[0317] Next, the search platform continues to search in the index content corresponding to "mobile phone" to see if it contains the search term "news". Similarly, it can first search for the index of the character "new" in the index content, and then search for the index of the character "wen" in the index content, and detect whether the index corresponding to the character "new" is adjacent to the index corresponding to the character "wen".
[0318] For example, in the index content corresponding to "mobile phone", if the index corresponding to the character "new" is 5 and the index corresponding to the character "wen" is 6, it can be determined that the index corresponding to the character "new" is adjacent to the index corresponding to the character "wen". In this way, it can be determined that both the search terms "mobile phone" and "news" are successfully matched in the index content of the same note, and the index content of this note is the first search content that meets the search conditions.
[0319] It should be noted that when the related technology matches search terms, it performs the matching according to the natural semantics. For example, when searching for the first search content containing the search terms from all the stored index content according to the natural semantics, it may cause some first search content not to be searched. However, the embodiments of the present application can search for the first search content containing multiple search terms from all the stored index content based on the single-character search method, making the search accuracy of the first search content higher.
[0320] S1305, the search middleware returns the first index content to the index query module.
[0321] When the search middleware returns the first index content to the index query module, it also returns multiple search terms and the positions where each search term is located, such as whether each search term is located in the title position, the body position, or the picture position.
[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 the fourth search request and send the fourth search request to the data storage module.
[0324] Exemplarily, the first 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.
[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 the 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 identifier 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] Moreover, the data storage module can check whether the note identifiers included in the Parent_uuid field of the attachment table in each stored note data match the note identifier included in the noteId field in the picture 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 note identifiers included in the Uuid field of the attachment table in each stored note data match the attachment identifier included in the Identifier in the picture index content, and determine the note corresponding to the matching note data as the second note.
[0329] Among them, the note data corresponding to the second note includes the note table and the 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 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 sorts out 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 picture and the note data corresponding to the text, the note data corresponding to the picture and the note data corresponding to the text can be merged.
[0334] Moreover, when there are multiple second notes, the index query module can sort the note data corresponding to the multiple second notes according to a preset sorting method.
[0335] Among them, 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 positions of multiple search terms in the second note, and the positions of multiple search terms in the second note include at least one of the title position, the body position, and the picture position.
[0336] S1310, the index query module returns the note data corresponding to the sorted 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 sorted second note.
[0338] Of course, the index query module may also not sort 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] Exemplarily, Figure 14 The present application provides a flowchart for performing word segmentation search on notes. Refer to Figure 14 As shown, the process of performing word segmentation search on notes may specifically include the following steps:
[0340] S1401, receive 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. The multiple search terms can be separated by spaces or not.
[0342] For example, the multiple search terms entered by the user in the search box are "mobile phone news", which are separated by spaces; or, the multiple search terms entered by the user in the search box are "mobile phone news", which are not separated by spaces.
[0343] S1402, determine whether the multiple search terms are separated by spaces.
[0344] The list display interface responds to the operation of multiple search terms entered in the search box, sends a search request to the index query module, and the index query module determines whether the multiple search terms are separated by spaces based on the search request.
[0345] S1403, when the multiple search terms are separated by spaces, split the multiple search terms according to the spaces.
[0346] S1404, perform searches according to each search term respectively.
[0347] S1405, perform matching on each search term in the single-character search mode.
[0348] For the implementation manners of the steps corresponding to S1404 and S1405, reference may be made to the implementation manner of the steps corresponding to S1304 above, and details are not described herein again.
[0349] S1406, when the index content of the same note includes multiple search terms, return the index content of the note.
[0350] S1407. When there is no space between multiple search terms, the multiple search terms are treated as a combined term for matching.
[0351] S1408. When the indexed content of a note includes a combined term, return the indexed content of the note.
[0352] When there is no space between multiple search terms, the index query module can treat the multiple search terms as a combined term to query the indexed content including the combined term from the search middleware. Specifically, when the search middleware queries the indexed content including the combined term, it can also perform matching in the single-character search mode.
[0353] For ease of understanding, in the embodiments of the present application, a mobile phone is used as the electronic device. First, in combination with some user interfaces shown in the embodiments of the present application, the application scenario of performing pinyin search on notes is described.
[0354] Exemplarily, the electronic device can display an eighth application interface 701 as shown in (a) of Figure 15 . The eighth application interface 701 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 operation of inputting pinyin in the second search box 7011, display a fourteenth application interface 1501 as shown in (b) of Figure 15 . The fourteenth application interface 1501 displays the notes that include the keywords corresponding to the pinyin searched from all the notes stored in the note application.
[0356] For example, the pinyin input by the user in the second search box 7011 can be "zhongxin", the note content of the notes stored in the note application can be "The news center of mobile phone XX network is the core of XX network...", and the keywords corresponding to the pinyin "zhongxin" can be "center" or "core", etc. Therefore, this searched note can be displayed on the fourteenth application interface 1501.
[0357] Exemplarily, Figure 16 is a schematic diagram of module interaction for performing pinyin search on notes provided by the embodiments of the present application. Referring to Figure 16 as shown, the electronic device includes a note application and a search middleware. The note application can include a list display interface, a data storage module, and an index query module. The process of performing pinyin search on notes can specifically include the following steps:
[0358] S1601. The list display interface receives the pinyin input by the user in the search box.
[0359] S1602. The list display interface sends a fifth search request to the index query module in response to a third operation of entering pinyin in the search box; the fifth search request includes pinyin.
[0360] The electronic device can display a first interface of the note application. The first interface can be the eighth application interface 701 shown in (a) of Figure 15 . The first interface can belong to the list display interface. Among them, the first interface includes a search box, and the search box included in the first interface can be the second search box 7011 in the eighth application interface 701 shown in (a) of Figure 15 .
[0361] The list display interface can receive the pinyin entered by the user in the search box included in the first interface. The list display interface sends a fifth search request to the index query module in response to a third operation of entering pinyin in the search box. The fifth search request includes pinyin.
[0362] S1603. The index query module sends a sixth search request to the search middle platform based on the fifth search request; the sixth search request includes pinyin and a second search method, and the second search method includes a pinyin search method.
[0363] The index query module can determine that it is necessary to search for matching index content in the pinyin search method according to the pinyin in the fifth search request. Therefore, the index query module can generate a sixth search request and send the sixth search request to the search middle platform.
[0364] Among them, the sixth search request includes pinyin and the pinyin search method. The pinyin search method is used to indicate that when the search middle platform searches for the second index content according to the pinyin from the stored index content, it is to search for the index content containing the keyword corresponding to the pinyin.
[0365] S1604. The search middle platform searches for and obtains the second index content from the stored index content according to the pinyin search method; the second index content includes the keyword corresponding to the pinyin.
[0366] The search middle platform searches for and obtains the second index content from all the index content stored in the search middle platform according to the pinyin in the sixth search request and according to the pinyin search method. Among them, the second index content is the index content including the keyword corresponding to the pinyin, and the second index content includes text index content and / or picture index content.
[0367] For example, if the content of a note is "Mobile XX Network News Center is the center of gravity of XX Network", when the search center stores the index content of the note, it can be stored in the Description field in the text index content or the noteSearchContent field in the text index content as a single word type. The index corresponding to the word "中" included in "中心" is 7, the index corresponding to the word "心" included in "中心" is 8, the index corresponding to the word "重" included in "重中心" is 13, and the index corresponding to the word "心" included in "重中心" is 14.
[0368] In this way, the pinyin entered by the user in the search box of the first interface is "zhongxin". The search center can obtain the two keywords "center" and "center of gravity" by matching the keywords corresponding to "zhongxin" through indexing, and determine the index content containing the keywords "center" or "center of gravity" as the second index content.
[0369] S1605: The search center returns the second index content to the index query module.
[0370] When the search center returns the second index content to the index query module, it will also return the keywords corresponding to the pinyin and the position of the keywords corresponding to the pinyin, such as whether the keywords corresponding to the pinyin are located in the title position, the 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 a 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 image index content, and the attachment identifier included in the Identifier in the image index content, etc.
[0374] S1607, the data storage module searches 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 includes a 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 sorts out 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 includes both the note data corresponding to the picture and the note data corresponding to the text, the note data corresponding to the picture and the note data corresponding to the text can be merged.
[0379] Moreover, in the case where there are multiple third notes, the index query module can sort the note data corresponding to the multiple third notes according to a preset sorting method.
[0380] Among them, 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 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 picture position.
[0381] S1610. The index query module returns the sorted 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 sorted note data corresponding to the third note.
[0383] Of course, the index query module can also directly return the note data corresponding to the third note to the list display interface without sorting out the note data corresponding to the third note, and the list display interface displays the third note based on the note data corresponding to the third note.
[0384] For the convenience of understanding, in the embodiments of the present application, a mobile phone is used as the electronic device. First, in combination with some user interfaces shown in the embodiments of the present application, the application scenarios of highlighting the search terms in the searched target notes are described.
[0385] Exemplarily, the electronic device can display the thirteenth application interface 1201 as shown in (a) of Figure 17 , and display the searched note including multiple search terms in the thirteenth application interface 1201.
[0386] The electronic device can receive the touch operation of the user on the searched note, and in response to the touch operation on the searched note, display as shown in Figure 17The fifteenth application interface 1701 shown in (b) of []. The fifteenth application interface 1701 can display the note content of this note, and display multiple search terms in the note content of this note in a highlighted manner.
[0387] For example, if the multiple search terms are "mobile news", then in the note content "The news center of Mobile XX Network is the focus of XX Network..." displayed on the fifteenth application interface 1701, "mobile" and "news" can be highlighted.
[0388] Exemplarily, Figure 18 This is a schematic diagram of module interaction for highlighting search terms in the target note found in the embodiments of this application. Refer to Figure 18 As shown, the electronic device includes a note application, and the note application includes a list display interface and a detail editing display interface. The process of highlighting search terms in the target note found can specifically include the following steps:
[0389] S1801, the list display interface displays the target note.
[0390] The list display interface can display the target note, and the target note can be the second note or the third note, etc.
[0391] S1802, the list display interface receives a fourth operation by the user on any one of the target notes.
[0392] S1803, in response to the fourth operation on any one 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 detail editing display interface.
[0393] The list display interface can receive a fourth operation by the user on any one of the target notes, and in response to the fourth operation on any one of the target notes, send the note data and matching words corresponding to the target note selected by the fourth operation to the detail editing display interface.
[0394] Among them, 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 the keywords corresponding to the pinyin.
[0395] S1804, the detail editing display interface displays the target note selected by the fourth operation based on the note data corresponding to the target note selected by the fourth operation, and displays the matching words in the target note selected by the fourth operation in a preset display manner.
[0396] After the detail editing display interface receives the note data and the matching words corresponding to the target note selected in the fourth operation, based on the note data corresponding to the target note selected in the fourth operation, it displays the target note selected in the fourth operation, and uses at least one of the display methods of highlighting, bolding, and italicizing to display the matching words in the target note selected in the fourth operation.
[0397] For example, the fifteenth application interface 1701 may belong to the detail editing display interface, and highlight multiple search words in the note content displayed on the fifteenth application interface 1701.
[0398] Exemplarily, Figure 19 This is a schematic flowchart for highlighting search words in the target note searched in the embodiment of the present application. Refer to Figure 19 As shown, the process of highlighting search words in the target note searched may specifically include the following steps:
[0399] S1901, the list display interface receives a fourth operation by the user 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 the matching words corresponding to the target note selected in the fourth operation to the detail editing display interface.
[0401] The implementation manners of the steps corresponding to S1901 and S1902 are similar to the implementation manners of the steps corresponding to S1802 and S1803 above. To avoid repetition, they will not be elaborated here.
[0402] S1903, the detail editing display interface determines whether the matching words in the target note selected in the fourth operation include handwritten matching words.
[0403] S1904, when the matching words in the target note selected in the fourth operation include handwritten matching words, the detail editing display interface obtains the position information of the handwritten matching words.
[0404] The note data corresponding to the target note selected in the fourth operation includes an attachment table, and a json file will be stored in the content included in the Attachment_type field of the attachment table. The detail editing display interface can parse the json file to obtain the position information of the handwritten matching words.
[0405] S1905, the detail editing display interface highlights the area corresponding to the position 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 responds to a target operation input to the first interface, searches for note data corresponding to the target note from the stored note data; 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 a first operation, a second operation, and a 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 arranged at intervals in the 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 the 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 arranged at intervals 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, it can enable the user to quickly and accurately search for the corresponding notes, and make the note search method 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 20Schematic structural diagram of a note search device provided in an embodiment of this application. The note search device may be an electronic device, a chip, or a chip system within the electronic device in the embodiment of this application.
[0411] As Figure 20 shown, the note search device 2000 may include a display unit 2001 and a processing unit 2002. Among them, the display unit 2001 is used to support the note search device 2000 to execute the above-mentioned display step; the processing unit 2002 is used to support the note search device 2000 to execute the above-mentioned processing step.
[0412] Specifically, the display unit 2001 is used to display a first interface of a note application; the processing unit 2002 is used to search for note data corresponding to a target note from the stored note data in response to a target operation input to the first interface; the display unit 2001 is further used to display the target note based on the note data corresponding to the target note.
[0413] Among them, the target operation includes at least one of a first operation, a second operation, and a 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 terms 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 terms; 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.
[0414] In a possible implementation manner, the note search device 2000 further includes a storage unit 2003. The storage unit 2003 and the processing unit 2002 are connected by a line. The storage unit 2003 may include one or more memories, and the memory may be a device or a component in a circuit for storing programs or data. The storage unit 2003 may exist independently and be connected to the processing unit 2002 through a communication bus. The storage unit 2003 may also be integrated with the processing unit 2002.
[0415] The storage unit 2003 can store computer-executable instructions of the methods in the electronic device, so that the processing unit 2002 executes the methods in the above embodiments. The storage unit 2003 can be a register, a cache, or a random access memory (RAM), etc. The storage unit 2003 can be integrated with the processing unit 2002. The storage unit 2003 can be a read-only memory (ROM) or other types of static storage devices that can store static information and instructions. The storage unit 2003 can be independent of the processing unit 2002.
[0416] Figure 21 This is a schematic structural diagram of a chip provided by an embodiment of the present application. As Figure 21 shown, the chip 2100 includes one or more than two (including two) processors 2101, communication lines 2102, and communication interfaces 2103. Optionally, the chip 2100 further includes a memory 2104.
[0417] In some embodiments, the memory 2104 stores the following elements: executable modules or data structures, or subsets thereof, or extended sets thereof.
[0418] The methods described in the above embodiments of the present application can be applied to the processor 2101 or implemented by the processor 2101. The processor 2101 may be an integrated circuit chip with signal processing capabilities. In the implementation process, the steps of the above methods can be completed by the integrated logic circuit in the hardware of the processor 2101 or instructions in software form. The above processor 2101 can be a general-purpose processor (e.g., a microprocessor or a conventional processor), a digital signal processor, an application specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or other programmable logic devices, discrete gate, transistor logic devices, or discrete hardware components. The processor 2101 can implement or execute the various methods, steps, and logic block diagrams disclosed in the embodiments of the present application.
[0419] The steps of the method disclosed in the embodiments of the present application can be directly implemented by a hardware decoding processor, or implemented by a combination of hardware and software modules in the decoding processor. Among them, the software module can be located in a mature storage medium in the art such as a random access memory, a read-only memory, a programmable read-only memory, or an electrically erasable programmable read-only memory (EEPROM). This storage medium is located in the memory 2104, and the processor 2101 reads the information in the memory 2104 and combines its hardware to complete the steps of the above method.
[0420] Communication can be carried out between the processor 2101, the memory 2104, and the communication interface 2103 through the communication line 2102.
[0421] In the above embodiments, the instructions stored in the memory for the processor to execute can be implemented in the form of a computer program product. Among them, the computer program product can be pre-written in the memory, or downloaded and installed in the memory in the form of software.
[0422] The embodiments of the present application also provide a computer program product, which includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the processes or functions according to the embodiments of the present application are generated in whole or in part. The computer can be a general-purpose computer, a dedicated computer, a computer network, or other programmable devices. The computer instructions can be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions can be transmitted from a website, a computer, a server, or a data center to another website, a computer, a server, or a data center in a wired manner (such as coaxial cable, optical fiber, digital subscriber line (DSL)) or a wireless manner (such as infrared, wireless, microwave, etc.). The computer-readable storage medium can be any available medium that the computer can store, or a data storage device such as a server or a data center that includes one or more integrated available media. For example, the available medium can include a magnetic medium (such as a floppy disk, a hard disk, or a magnetic tape), an optical medium (such as a digital versatile disc (DVD)), or a semiconductor medium (such as a solid state disk (SSD)).
[0423] The embodiments of the present application provide an electronic device, which includes a processor and a memory. The memory is used to store a computer program, and the processor is used to call the computer program to execute the above note search method.
[0424] An embodiment of the present application provides a chip. The chip includes a processor, and the processor is used to call a computer program in a memory to execute the technical solutions in the above embodiments. The implementation principle and technical effects are similar to those of the above related embodiments, and will not be elaborated here.
[0425] An embodiment of the present 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, the above method is implemented. The methods described in the above embodiments can be implemented in whole or in part by software, hardware, firmware, or any combination thereof. If implemented in software, the functions can be stored as one or more instructions or codes on a computer-readable medium or transmitted on a computer-readable medium. The computer-readable medium can include a computer storage medium and a communication medium, 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 a possible design, the computer-readable medium can include a compact disc read-only memory (CD-ROM), RAM, ROM, EEPROM, or other optical disc memories; the computer-readable medium can include a magnetic disk memory or other magnetic disk storage devices. Moreover, any connection line can also be appropriately referred to as a computer-readable medium. 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 the coaxial cable, fiber optic cable, twisted pair, DSL, or wireless technologies such as infrared, radio, and microwave are included in the definition of the medium. As used herein, magnetic disks and optical discs include optical discs (CDs), laser discs, optical discs, DVDs, floppy disks, and Blu-ray discs, where magnetic disks usually reproduce data magnetically, while optical discs use lasers to optically reproduce data. The above combinations should also be included within the scope of the computer-readable medium.
[0427] Embodiments of the present application are described with reference to the flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present application. It should be understood that each flow and / or block in the flowchart and / or block diagram, and the combination of flows and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to the processing unit of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, such that the instructions executed by the processing unit of the computer or other programmable data processing device generate a device for implementing the functions specified in Figure One one flow or multiple flows and / or blocks Figure One one block or multiple blocks.
[0428] In the above specific embodiments, the purpose, technical solution and beneficial effects of the present application have been further described in detail. It should be understood that the above are only specific embodiments of the present application and are not used to limit the protection scope of the present application. Any modifications, equivalent replacements, improvements, etc. made on the basis of the technical solution of the present application shall be included in the protection scope of the present application.
Claims
1. A note search method, characterized in that Applied to an electronic device, the electronic device includes a note application, and the method includes: The electronic device displays a first interface of the note application; The electronic device, in response to a target operation input to the first interface, searches for note data corresponding to a target note from the 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; Wherein, the first operation is an operation input to a target classification search option among a plurality of 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 a plurality of search terms 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 the plurality of search terms; 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.
2. The method according to claim 1, wherein The note application includes a list display interface, a data storage module, and an index query module; the electronic device, in response to a target operation input to the first interface, searches for note data corresponding to a target note from the stored note data, including: The list display interface, in response to the first operation input to the target classification search option, sends a first search request to the index query module; the first search request includes the attachment type indicated by the target classification search option; The index query module sends the first search request to the data storage module; The data storage module, based on the first search request, searches for note data corresponding to the first note from the stored note data; 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 note application includes a list display interface, a data storage module, and an index query module, and the electronic device further includes a search middle platform; the electronic device, in response to a target operation input to the first interface, searches for note data corresponding to a target note from the stored note data, including: The list display interface, in response to the second operation of inputting a plurality of search terms spaced apart from each other in the search box, sends a second search request to the index query module; the second search request includes the plurality of search terms; The index query module, based on the second search request, sends a third search request to the search middle platform; the third search request includes the plurality of search terms and a first search method; The search middle platform searches for a 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 middle 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.
4. The method according to claim 3, characterized in that, The first index content further includes a first note identifier; 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, 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 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; The data storage module returns the note data corresponding to the second note to the index query module.
5. The method according to claim 3, characterized in that The first search method includes a single-character search method; the search middleware searches for the first index content from the stored index content according to the first search method, including: The search middleware 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 in the index content stored by the search middleware that includes the keyword; The search middleware detects whether the indexes of each keyword in the search term are adjacent; When the indexes of each keyword in the search term are adjacent, the search middleware determines that the search term matches successfully; When 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.
6. The method according to claim 1, wherein The note application includes a list display interface, a data storage module, and an index query module, and the electronic device further includes a search middleware; 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, including: The list display interface sends a fifth search request to the index query module in response to the third operation of inputting pinyin in the search box; the fifth search request includes the pinyin; The index query module sends a sixth search request to the search middleware based on the fifth search request; the sixth search request includes the pinyin and a second search method, and the second search method includes a pinyin search method; The search middleware searches for 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 middleware 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 second index content; The index query module returns the note data corresponding to the third note to the list display interface.
7. The method according to claim 6, wherein The second index content further includes a second note identifier; 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, 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.
8. The method according to any one of claims 1 to 7, characterized in that, Before the electronic device displays the target note based on the note data corresponding to the target note, it 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; Among them, 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 word in the target note, and the position of the matching word in the target note includes at least one of the title position, the body position, and the picture position; When the target note is the second note, the matching word is the multiple search words; when the target note is the third note, the matching word is the keyword corresponding to the pinyin.
9. The method according to claim 3 or 6, characterized in that, The note application further includes a detail editing display interface; after the electronic device displays the target note based on the note data corresponding to the target note, it further includes: The list display interface sends the note data and the matching word corresponding to the target note selected by the fourth operation to the detail editing display interface in response to the fourth operation on any one of the target notes; The detail editing display interface displays the target note selected by the fourth operation based on the note data corresponding to the target note selected by the fourth operation, and displays the matching word in the target note selected by the fourth operation in a preset display manner; Among them, when the target note is the second note, the matching word is the multiple search words; when the target note is the third note, the matching word is the keyword corresponding to the pinyin; the preset display manner includes at least one of highlighting display, bold display, and italic display.
10. The method according to claim 9, wherein The detail editing display interface displays the matching word in the target note selected by the fourth operation in a preset display manner, including: When the matching word in the target note selected by the fourth operation includes a handwritten matching word, the detail editing display interface obtains the position information of the handwritten matching word; The detailed editing display interface highlights the area corresponding to the location information.
11. The method according to claim 9, characterized in that, The detailed editing display interface displays the matching words in the target note selected by the fourth operation in a preset display manner, including: When the matching words in the target note selected by 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 the preset display manner.
12. The method according to claim 1, wherein, The note application includes a detailed editing display interface, a data storage module, and an index creation module, and the electronic device further includes a search middleware; before the electronic device displays the first interface of the note application, it further includes: In response to a fifth operation on the fourth note that has been edited, the detailed 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 middleware; The data storage module sends a picture index insertion request corresponding to the fourth note to the index creation module; the picture index insertion request includes the note data corresponding to the fourth note; The index creation module constructs the picture index content corresponding to the fourth note based on the note data corresponding to the fourth note in the picture index insertion request; The index creation module sends the picture index content corresponding to the fourth note to the search middleware.
13. An electronic device, characterized in that, It includes a memory and a processor, the memory is used to store a computer program, and the processor is used to call the computer program to execute the note search method according to any one of claims 1 to 12.
14. A computer-readable storage medium, characterized in that, A computer program or instruction is stored in the computer-readable storage medium, and when the computer program or instruction is run, the note search method according to any one of claims 1 to 12 is implemented.
15. A computer program product, characterized in that, It includes a computer program, and when the computer program is run, it causes a computer to execute the note search method according to any one of claims 1 to 12.
Citation Information
Patent Citations
Contact person positioning method, system and mobile communication terminal
CN101369215A
File retrieval method and apparatus and terminal
CN105574062A
Information search method and device based on cloud technology, equipment and storage medium
CN111339421A
Data processing method and related equipment
CN113342831A
Middle-station data query method, device and equipment and storage medium
CN114090832A