Search method and device based on bitmap scoring

Through a search method based on bitmap scoring, combined with a constant scoring algorithm of bitmap encoding, the final document score is generated, which solves the problem of time-consuming and cost-effectiveness of existing search engines in complex search requirements, and realizes efficient and low-cost search Result processing.

CN114253976BActive Publication Date: 2024-12-03BEIJING DAJIA INTERNET INFORMATION TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202111570577.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-12-21
Publication Date
2024-12-03
Estimated Expiration
2041-12-21

AI Technical Summary

Technical Problem

When existing search engines deal with complex search needs, they take a long time and have high development and operation and maintenance costs, and cannot effectively meet custom scoring needs.

Method used

Using a search method based on bitmap scoring, the search keywords are preprocessed, and the DSL query statements with correlation scores and matching type scores are generated. Combined with the constant scoring algorithm of bitmap encoding, the final document score is generated to meet the business-specific fine-graining Requirements and reduce development and operation and maintenance costs without customizing search engine development.

Benefits of technology

Without increasing search time and search engine load, it meets complex search needs, saves development and operation and maintenance costs, and supports business-specific custom scoring needs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114253976B_ABST
    Figure CN114253976B_ABST
Patent Text Reader

Abstract

A search method and device based on bitmap scoring are provided. The search method based on bitmap scoring includes: preprocessing search keywords; obtaining multiple domain-specific language (DSL) query statements with a relevance scoring algorithm based on the preprocessed search keywords according to predetermined dimensions; obtaining bitmap scoring DSL query statements capable of identifying matching types based on the DSL query statements respectively; and obtaining search results of the search keywords based on the DSL query statements and the bitmap scoring DSL query statements.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of search, and more specifically, to a search method and device based on bitmap scoring. Background Art

[0002] Existing mainstream search engines (such as ElasticSearch, SOLR, etc.) can construct query statements through their respective DSLs (Domain Specific Languages) to perform corresponding searches.

[0003] As search services become more complex, two methods are usually used to meet custom requirements. The first method is to treat all documents that need to be scored as separate fields, add new fields to the index structure of search engines such as ElasticSearch, and use custom scoring functions to achieve overall comprehensive scoring. The second method is to extend the search engine and provide the function of returning the matching status of different fields from the search engine; specifically, generally larger Internet search companies have their own search engines, which can meet this special custom requirement by extending specific functions, while search engines such as ElasticSearch currently only provide this function in the debugging application program interface (API).

[0004] However, the above two methods still take a long time to search and have high development and operation costs. Summary of the invention

[0005] According to an exemplary embodiment of the present invention, a search method based on bitmap scoring is provided, comprising: preprocessing search keywords; obtaining a plurality of domain specific language (DSL) query statements with a relevance scoring algorithm according to predetermined dimensions based on the preprocessed search keywords; obtaining bitmap scoring DSL query statements capable of identifying matching types based on the DSL query statements respectively; and obtaining search results of the search keywords based on the DSL query statements and the bitmap scoring DSL query statements.

[0006] The step of obtaining a bitmap scoring DSL query statement capable of identifying a matching type based on a DSL query statement may include: replacing a relevance scoring algorithm in the DSL query statement with a constant scoring algorithm based on a bitmap encoding, wherein the constant scoring algorithm based on a bitmap encoding assigns different values ​​as scores to multiple matching types.

[0007] The plurality of matching types may include at least one of content full text matching, content phrase matching, title full text matching, and title phrase matching.

[0008] The step of obtaining the search results of the search keyword may include: obtaining a first search result of the search keyword based on the DSL query statement, and obtaining a second search result of the search keyword based on the bitmap scoring DSL query statement, wherein the first search result includes at least one searched document and a corresponding relevance score, and the second search result includes the at least one searched document and a corresponding matching type score; assigning different weights to the relevance score of the document and the matching type score of the document respectively to obtain a final score of the document; and obtaining the search results of the search keyword based on the at least one searched document and the corresponding final score.

[0009] The weight of the match type score of a document may be greater than the weight of the relevance score of a document.

[0010] According to an exemplary embodiment of the present invention, a search device based on bitmap scoring is provided, comprising: a preprocessing unit, configured to preprocess search keywords; a query statement obtaining unit, configured to obtain a plurality of domain specific language (DSL) query statements with a relevance scoring algorithm according to a predetermined dimension based on the preprocessed search keywords; a bitmap scoring query statement obtaining unit, configured to obtain bitmap scoring DSL query statements capable of identifying a matching type based on the DSL query statements respectively; and a search unit, configured to obtain search results of the search keywords based on the DSL query statements and the bitmap scoring DSL query statements.

[0011] The bitmap scoring query statement obtaining unit may be further configured to replace the relevance scoring algorithms in the DSL query statements with bitmap-encoded constant scoring algorithms, respectively, wherein the bitmap-encoded constant scoring algorithm assigns different values ​​as scores to multiple matching types.

[0012] The plurality of matching types may include at least one of content full text matching, content phrase matching, title full text matching, and title phrase matching.

[0013] The search unit may also be configured to perform the following operations: obtaining a first search result for the search keyword based on the DSL query statement, and obtaining a second search result for the search keyword based on the bitmap scoring DSL query statement, wherein the first search result includes at least one searched document and a corresponding relevance score, and the second search result includes the at least one searched document and a corresponding matching type score; assigning different weights to the relevance score of the document and the matching type score of the document, respectively, to obtain a final score of the document; and obtaining the search result for the search keyword based on the at least one searched document and the corresponding final score.

[0014] The weight of the match type score of a document may be greater than the weight of the relevance score of a document.

[0015] According to an exemplary embodiment of the present invention, an electronic device is provided, including a memory and a processor, wherein the memory stores computer executable instructions, and when the instructions are executed by the processor, the aforementioned bitmap scoring-based search method is executed.

[0016] According to an exemplary embodiment of the present invention, a computer-readable storage medium is provided, on which computer-executable instructions are stored. When the instructions are executed, the aforementioned bitmap scoring-based search method is performed.

[0017] According to an exemplary embodiment of the present invention, a computer program product is provided, comprising computer instructions, which implement the aforementioned bitmap scoring-based search method when executed by at least one processor.

[0018] According to an exemplary embodiment of the present invention, a bitmap scoring DSL can be additionally constructed based on the architecture of coarse sorting and recall, and the matching type between the searched documents and the search keywords can be obtained after parsing the query results in the subsequent fine sorting operation, so as to meet the business-specific fine sorting requirements and the subsequent iterative custom scoring requirements, and in the case of an open source search engine such as ElasticSearch, the search engine does not need to be customized and developed, saving development and operation and maintenance costs; in addition, in the case of parallel DSL execution, the total time consumed for a single search will not increase, and because the search engine will have a local memory cache for various filtering conditions, the actual load of the search engine will not increase significantly. BRIEF DESCRIPTION OF THE DRAWINGS

[0019] The above and other objects and features of the present invention will become more apparent from the following detailed description in conjunction with the accompanying drawings, in which:

[0020] Figure 1 is a flow chart illustrating a bitmap scoring-based search method according to an exemplary embodiment of the present invention;

[0021] Figure 2 is a flow chart showing obtaining search results of a search keyword according to an exemplary embodiment of the present invention;

[0022] Figure 3 is a block diagram illustrating a bitmap scoring-based search apparatus according to an exemplary embodiment of the present invention;

[0023] Figure 4 is a block diagram showing an electronic device according to an exemplary embodiment of the present invention;

[0024] Figure 5is a block diagram illustrating a server according to an exemplary embodiment of the present invention. DETAILED DESCRIPTION

[0025] Reference will now be made in detail to embodiments of the present invention, examples of which are illustrated in the accompanying drawings, wherein like reference numerals refer to like parts throughout. The embodiments will be described below in order to explain the present invention by referring to the drawings.

[0026] It should be noted that the terms "first", "second", etc. in the specification and claims of the present disclosure and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present disclosure described herein can be implemented in an order other than those illustrated or described herein. The implementation methods described in the following examples do not represent all implementation methods consistent with the present disclosure. Instead, they are merely examples of devices and methods consistent with some aspects of the present disclosure as detailed in the attached claims.

[0027] It should be noted that the phrase "at least one of the items" in the present disclosure includes three types of parallel situations: "any one of the items", "a combination of any number of the items", and "all of the items". For example, "including at least one of A and B" includes the following three parallel situations: (1) including A; (2) including B; (3) including A and B. Another example is "executing at least one of step 1 and step 2" which means the following three parallel situations: (1) executing step 1; (2) executing step 2; (3) executing step 1 and step 2.

[0028] Figure 1 is a flowchart illustrating a bitmap scoring-based search method according to an exemplary embodiment of the present invention.

[0029] Reference Figure 1 In step S110, the search keywords may be pre-processed.

[0030] Here, as an example only and not a limitation, when a user inputs the search keyword "okr review", the input keyword may be preprocessed first, for example, the input keyword may be segmented to obtain "okr" and "review", and "review" may be expanded to "examine" based on a synonym vocabulary; in addition, because the length of the matching words will affect the final score in the subsequent refinement step, in order to avoid the problem that the length of English characters is longer than the length of Chinese characters, the English character length of the search keyword (such as, the English character length of "okr review" is 10) may be divided by a specific coefficient (as an example only and not a limitation, 3).

[0031] In step S120, multiple DSL query statements with a relevance scoring algorithm may be obtained based on the preprocessed search keywords according to predetermined dimensions. Here, the DSL query statement may be used to obtain the searched documents and obtain the corresponding scores of the searched documents based on the relevance scoring algorithm, and the DSL query statement here may be used as a rough ranking DSL query statement. In addition, by way of example only and not limitation, the predetermined dimension may include a document type dimension, a browsing record dimension, etc.

[0032] More specifically, as an example only and not a limitation, taking the document type dimension as an example, multiple DSL query statements can be obtained according to the document type dimension. For example, if the document type includes file type, table type and other types, three DSL query statements can be generated, which are respectively used to obtain file documents containing "okr", "review" and "examine" from documents of the file type, and when the file document contains "okr review" or "okr examine", an additional score can be added to the document; obtain table documents containing "okr", "review" and "examine" from documents of the table type, and when the table document contains "okr review" or "okr examine", an additional score can be added to the document; obtain other documents containing "okr", "review" and "examine" from documents of other types, and when the other documents contain "okr review" or "okrexamine", an additional score can be added to the document. In addition, as an example only and not a limitation, the scoring function in the three DSL query statements of the above examples can use the default relevance scoring algorithm of ElasticSearch.

[0033] In step S130 , a bitmap scoring DSL query statement capable of identifying a matching type may be obtained based on the DSL query statement.

[0034] More specifically, the relevance scoring algorithm in the DSL query statement can be replaced with a constant scoring algorithm based on bitmap coding to obtain a bitmap scoring DSL query statement capable of identifying the matching type, thereby obtaining multiple bitmap scoring DSL query statements capable of identifying the matching type, wherein the constant scoring algorithm based on bitmap coding assigns different values ​​as scores to multiple matching types. Here, as an example only and not a limitation, the multiple matching types may include at least one of content full text matching, content phrase matching, title full text matching, and title phrase matching.

[0035] Table 1 below shows various matching types and their corresponding values. Different values ​​can be combined with each other.

[0036] [Table 1]

[0037] Binary Decimal meaning 0001 1 Full text matching 0010 2 Content phrase matching 0100 4 Title full text match 1000 8 Title phrase match

[0038] Referring to Table 1, through the bitmap scoring DSL query statement, when the title of the searched document matches the search keyword phrase, the constant scoring algorithm is used to make the document score 8 in decimal; when the title of the searched document matches the full text of the search keyword, the constant scoring algorithm is used to make the document score 4 in decimal; when the content of the searched document matches the search keyword phrase, the constant scoring algorithm is used to make the document score 2 in decimal; when the content of the searched document matches the full text of the search keyword, the constant scoring algorithm is used to make the document score 1 in decimal. In addition, the above scores of the documents can be combined with each other. For example, if the bitmap scoring DSL query result score of a certain document is 11 in decimal (1011 in binary), it can be determined that the document contains a title phrase match, a content phrase match, and a content full text match. It should be understood that the values ​​listed in Table 1 above are only examples and not limitations, and those skilled in the art can modify them according to actual needs.

[0039] In step S140, search results of the search keyword may be obtained based on the DSL query statement and the bitmap scoring DSL query statement.

[0040] The following will refer to Figure 2 Step S140 is described in more detail.

[0041] Reference Figure 2 In step S210, a first search result for the search keyword may be obtained based on the DSL query statement, and a second search result for the search keyword may be obtained based on the bitmap scoring DSL query statement, wherein the first search result includes at least one document searched out and a corresponding relevance score, and the second search result includes the at least one document searched out and a corresponding matching type score. Here, a search engine such as ElasticSearch may use multiple threads to execute multiple DSL query statements and multiple bitmap scoring DSL query statements in parallel, and may obtain query results within a predetermined maximum timeout period to increase the search speed.

[0042] In step S220, different weights may be assigned to the relevance score of the document and the matching type score of the document to obtain the final score of the document. Here, when obtaining the final score of the document, in addition to the relevance score of the document and the matching type score of the document, other search-related data may be used together for weighting, such as the total number of browses, the total number of browses, the most recent browsing time, likes, favorites, comments, citations, etc. of the document may be obtained based on the document number and user number of the searched document as the other search-related data, and weights may be assigned to the other search-related data in the same manner, and weighted together with the relevance score of the document and the matching type score of the document. In addition, as an example only and not a limitation, the above data may be weighted according to the rescoring strategy defined by the business to obtain the final score of the document. In addition, as an example only and not a limitation, the weight of the matching type score of the document may be greater than the weight of the relevance score of the document, or the matching type score of the document may be directly assigned a high priority to calculate the final score of the document.

[0043] In step S230, a search result of the search keyword may be obtained based on the at least one document searched out and the corresponding final score, wherein the search result may be the at least one document sorted according to the final score.

[0044] In addition, after obtaining the search results, the search results can be saved, a unique page number is generated, and the search results of the first page are displayed. If the page number requested by the user is greater than the first page and the request parameter includes the page number, the corresponding page can be directly selected based on the page number and the page number. In addition, different display fields can be assembled in response to the user request and the search results can be returned to the user.

[0045] It should be noted that the user information involved in this disclosure (including but not limited to user device information, user personal information, etc.) is all information authorized by the user or fully authorized by all parties.

[0046] Figure 3 is a block diagram illustrating a bitmap scoring-based search apparatus according to an exemplary embodiment of the present invention.

[0047] Reference Figure 3 According to an exemplary embodiment of the present invention, a bitmap scoring-based search device 300 may include a preprocessing unit 310 , a query statement obtaining unit 320 , a bitmap scoring query statement obtaining unit 330 , and a search unit 340 .

[0048] The preprocessing unit 310 may be configured to preprocess the search keyword. More specifically, the preprocessing unit 310 may be further configured to segment and expand the search keyword.

[0049] The query statement obtaining unit 320 may be configured to obtain a plurality of domain specific language (DSL) query statements with a relevance scoring algorithm based on the preprocessed search keywords according to a predetermined dimension.

[0050] The bitmap scoring query statement obtaining unit 330 may be configured to obtain a bitmap scoring DSL query statement capable of identifying a matching type based on the DSL query statement. More specifically, the bitmap scoring query statement obtaining unit 330 may be further configured to replace the relevance scoring algorithm in the DSL query statement with a constant scoring algorithm based on bitmap coding, wherein the constant scoring algorithm based on bitmap coding assigns different values ​​as scores to multiple matching types.

[0051] The search unit 340 may be configured to obtain the search results of the search keyword based on the DSL query statement and the bitmap scoring DSL query statement. More specifically, the search unit 340 may be configured to perform the following operations: obtain the first search results of the search keyword based on the DSL query statement, and obtain the second search results of the search keyword based on the bitmap scoring DSL query statement, wherein the first search results include at least one searched document and a corresponding relevance score, and the second search results include the at least one searched document and a corresponding matching type score; assign different weights to the relevance score of the document and the matching type score of the document respectively to obtain the final score of the document; obtain the search results of the search keyword based on the at least one searched document and the corresponding final score.

[0052] Figure 4 700 is a block diagram showing an electronic device according to an exemplary embodiment of the present invention. The electronic device 700 may be, for example, a smart phone, a tablet computer, an MP4 (Moving Picture Experts Group Audio Layer IV) player, a laptop computer, or a desktop computer. The electronic device 400 may also be referred to as a user device, a portable terminal, a laptop terminal, a desktop terminal, or other names.

[0053] Typically, the electronic device 400 includes a processor 401 and a memory 402 .

[0054] The processor 401 may include one or more processing cores, such as a 4-core processor, an 8-core processor, etc. The processor 401 may be implemented in at least one hardware form of DSP (Digital Signal Processing), FPGA (Field Programmable Gate Array), and PLA (Programmable Logic Array). The processor 401 may also include a main processor and a coprocessor. The main processor is a processor for processing data in an awake state, also known as a CPU (Central Processing Unit); the coprocessor is a low-power processor for processing data in a standby state. In some embodiments, the processor 401 may be integrated with a GPU (Graphics Processing Unit), which is responsible for rendering and drawing the content to be displayed on the display screen. In some embodiments, the processor 401 may also include an AI (Artificial Intelligence) processor, which is used to process computing operations related to machine learning.

[0055] The memory 402 may include one or more computer-readable storage media, which may be non-transitory. The memory 402 may also include high-speed random access memory and non-volatile memory, such as one or more disk storage devices and flash memory storage devices. In some embodiments, the non-transitory computer-readable storage medium in the memory 402 is used to store at least one instruction, which is used to be executed by the processor 401 to implement the following. Figure 1 The illustrated method embodiment provides a search method based on bitmap scoring.

[0056] In some embodiments, the electronic device 400 may further optionally include: a peripheral device interface 403 and at least one peripheral device. The processor 401, the memory 402 and the peripheral device interface 403 may be connected via a bus or a signal line. Each peripheral device may be connected to the peripheral device interface 403 via a bus, a signal line or a circuit board. Specifically, the peripheral device includes: at least one of a radio frequency circuit 404, a touch display screen 405, a camera 406, an audio circuit 407, a positioning component 408 and a power supply 409.

[0057] The peripheral device interface 403 may be used to connect at least one peripheral device related to I / O (Input / Output) to the processor 401 and the memory 402. In some embodiments, the processor 401, the memory 402, and the peripheral device interface 403 are integrated on the same chip or circuit board; in some other embodiments, any one or two of the processor 401, the memory 402, and the peripheral device interface 403 may be implemented on a separate chip or circuit board, which is not limited in this embodiment.

[0058] The radio frequency circuit 404 is used to receive and transmit RF (Radio Frequency) signals, also known as electromagnetic signals. The radio frequency circuit 404 communicates with the communication network and other communication devices through electromagnetic signals. The radio frequency circuit 404 converts the electrical signal into an electromagnetic signal for transmission, or converts the received electromagnetic signal into an electrical signal. Optionally, the radio frequency circuit 404 includes: an antenna system, an RF transceiver, one or more amplifiers, a tuner, an oscillator, a digital signal processor, a codec chipset, a user identity module card, and the like. The radio frequency circuit 404 can communicate with other terminals through at least one wireless communication protocol. The wireless communication protocol includes, but is not limited to: a metropolitan area network, various generations of mobile communication networks (2G, 3G, 4G and 5G), a wireless local area network and / or a WiFi (Wireless Fidelity) network. In some embodiments, the radio frequency circuit 404 may also include circuits related to NFC (Near Field Communication), which is not limited in the present disclosure.

[0059] The display screen 405 is used to display the UI (User Interface). The UI may include graphics, text, icons, videos, and any combination thereof. When the display screen 405 is a touch display screen, the display screen 405 also has the ability to collect touch signals on the surface or above the surface of the display screen 405. The touch signal can be input to the processor 401 as a control signal for processing. At this time, the display screen 405 can also be used to provide virtual buttons and / or virtual keyboards, also known as soft buttons and / or soft keyboards. In some embodiments, the display screen 405 can be one, set on the front panel of the electronic device 400; in other embodiments, the display screen 405 can be at least two, respectively set on different surfaces of the electronic device 400 or in a folding design; in some other embodiments, the display screen 405 can be a flexible display screen, set on the curved surface or folding surface of the electronic device 400. Even, the display screen 405 can also be set to a non-rectangular irregular shape, that is, a special-shaped screen. The display screen 405 can be made of materials such as LCD (Liquid Crystal Display), OLED (Organic Light-Emitting Diode, organic light-emitting diode).

[0060] The camera assembly 406 is used to capture images or videos. Optionally, the camera assembly 406 includes a front camera and a rear camera. Typically, the front camera is arranged on the front panel of the terminal, and the rear camera is arranged on the back of the terminal. In some embodiments, there are at least two rear cameras, which are any one of a main camera, a depth of field camera, a wide-angle camera, and a telephoto camera, so as to realize the fusion of the main camera and the depth of field camera to realize the background blur function, the fusion of the main camera and the wide-angle camera to realize the panoramic shooting and VR (Virtual Reality) shooting function or other fusion shooting functions. In some embodiments, the camera assembly 406 may also include a flash. The flash can be a monochrome temperature flash or a dual-color temperature flash. A dual-color temperature flash refers to a combination of a warm light flash and a cold light flash, which can be used for light compensation at different color temperatures.

[0061] The audio circuit 407 may include a microphone and a speaker. The microphone is used to collect sound waves from the user and the environment, and convert the sound waves into electrical signals and input them into the processor 401 for processing, or input them into the radio frequency circuit 404 to achieve voice communication. For the purpose of stereo acquisition or noise reduction, there may be multiple microphones, which are respectively arranged at different parts of the electronic device 400. The microphone may also be an array microphone or an omnidirectional acquisition microphone. The speaker is used to convert the electrical signal from the processor 401 or the radio frequency circuit 404 into sound waves. The speaker may be a traditional film speaker or a piezoelectric ceramic speaker. When the speaker is a piezoelectric ceramic speaker, it can not only convert the electrical signal into sound waves audible to humans, but also convert the electrical signal into sound waves inaudible to humans for purposes such as ranging. In some embodiments, the audio circuit 407 may also include a headphone jack.

[0062] Positioning component 408 is used to locate the current geographic location of electronic device 400 to implement navigation or LBS (Location Based Service). Positioning component 408 can be a positioning component based on the US GPS (Global Positioning System), China's Beidou system, Russia's Grenas system or the European Union's Galileo system.

[0063] The power supply 409 is used to power various components in the electronic device 400. The power supply 409 can be an alternating current, a direct current, a disposable battery, or a rechargeable battery. When the power supply 409 includes a rechargeable battery, the rechargeable battery can support wired charging or wireless charging. The rechargeable battery can also be used to support fast charging technology.

[0064] In some embodiments, the electronic device 400 further includes one or more sensors 410 , including but not limited to: an acceleration sensor 411 , a gyroscope sensor 412 , a pressure sensor 413 , a fingerprint sensor 414 , an optical sensor 415 , and a proximity sensor 416 .

[0065] The acceleration sensor 411 can detect the magnitude of acceleration on the three coordinate axes of the coordinate system established by the electronic device 400. For example, the acceleration sensor 411 can be used to detect the components of gravity acceleration on the three coordinate axes. The processor 401 can control the touch display screen 405 to display the user interface in a horizontal view or a vertical view according to the gravity acceleration signal collected by the acceleration sensor 411. The acceleration sensor 411 can also be used for collecting game or user motion data.

[0066] The gyro sensor 412 can detect the body direction and rotation angle of the electronic device 400, and the gyro sensor 412 can cooperate with the acceleration sensor 411 to collect the user's 3D actions on the electronic device 400. The processor 401 can implement the following functions based on the data collected by the gyro sensor 412: motion sensing (such as changing the UI according to the user's tilt operation), image stabilization during shooting, game control, and inertial navigation.

[0067] The pressure sensor 413 can be set on the side frame of the electronic device 400 and / or the lower layer of the touch display screen 405. When the pressure sensor 413 is set on the side frame of the electronic device 400, it can detect the user's holding signal of the electronic device 400, and the processor 401 performs left and right hand recognition or shortcut operations according to the holding signal collected by the pressure sensor 413. When the pressure sensor 413 is set on the lower layer of the touch display screen 405, the processor 401 controls the operability controls on the UI according to the user's pressure operation on the touch display screen 405. The operability controls include at least one of a button control, a scroll bar control, an icon control, and a menu control.

[0068] The fingerprint sensor 414 is used to collect the user's fingerprint, and the processor 401 identifies the user's identity based on the fingerprint collected by the fingerprint sensor 414, or the fingerprint sensor 414 identifies the user's identity based on the collected fingerprint. When the user's identity is identified as a trusted identity, the processor 401 authorizes the user to perform relevant sensitive operations, which include unlocking the screen, viewing encrypted information, downloading software, paying, and changing settings. The fingerprint sensor 414 can be set on the front, back, or side of the electronic device 400. When a physical button or a manufacturer logo is set on the electronic device 400, the fingerprint sensor 414 can be integrated with the physical button or the manufacturer logo.

[0069] The optical sensor 415 is used to collect the ambient light intensity. In one embodiment, the processor 401 can control the display brightness of the touch display screen 405 according to the ambient light intensity collected by the optical sensor 415. Specifically, when the ambient light intensity is high, the display brightness of the touch display screen 405 is increased; when the ambient light intensity is low, the display brightness of the touch display screen 405 is reduced. In another embodiment, the processor 401 can also dynamically adjust the shooting parameters of the camera assembly 406 according to the ambient light intensity collected by the optical sensor 415.

[0070] The proximity sensor 416, also called a distance sensor, is usually arranged on the front panel of the electronic device 400. The proximity sensor 416 is used to collect the distance between the user and the front of the electronic device 400. In one embodiment, when the proximity sensor 416 detects that the distance between the user and the front of the electronic device 400 is gradually decreasing, the processor 401 controls the touch display screen 405 to switch from the screen-on state to the screen-off state; when the proximity sensor 416 detects that the distance between the user and the front of the electronic device 400 is gradually increasing, the processor 401 controls the touch display screen 405 to switch from the screen-off state to the screen-on state.

[0071] Those skilled in the art will understand that Figure 4 The structure shown in the figure does not constitute a limitation on the electronic device 400, and may include more or less components than those shown in the figure, or combine some components, or adopt a different component arrangement.

[0072] Figure 5 is a diagram showing a server according to an exemplary embodiment of the present invention. Figure 5 The server 500 includes one or more processors 510 and a memory 520. The memory 520 may include a processor for executing the above-mentioned Figure 1 and Figure 2 The server 500 may also include a power supply component 530 configured to perform power management of the server 500, a wired or wireless network interface 540 configured to connect the server 500 to the network, and an input / output (I / O) interface 550. The server 500 may operate based on an operating system stored in the memory 520, such as Windows Server 2000. TM , Mac OS X TM , Unix TM 、Linux TM , FreeBSD TM or similar.

[0073] According to an exemplary embodiment of the present invention, a computer-readable storage medium may also be provided, wherein when the instructions in the computer-readable storage medium are executed by at least one processor, the at least one processor is prompted to perform a bitmap scoring-based search method according to an exemplary embodiment of the present invention. Examples of computer-readable storage media here include: read-only memory (ROM), random access programmable read-only memory (PROM), electrically erasable programmable read-only memory (EEPROM), random access memory (RAM), dynamic random access memory (DRAM), static random access memory (SRAM), flash memory, non-volatile memory, CD-ROM, CD-R, CD+R, CD-RW, CD+RW, DVD-ROM, DVD-R, DVD+R, DVD-RW, DVD+RW, DVD-RAM, BD-ROM, BD-R, BD-R LTH, BD-RE, Blu-ray or optical disk storage, hard disk drive (HDD), solid state drive (SSD), card storage (such as, multimedia card, secure digital (SD) card or extreme digital (XD) card), magnetic tape, floppy disk, magneto-optical data storage device, optical data storage device, hard disk, solid state disk and any other device, any other device is configured to store computer programs and any associated data, data files and data structures in a non-transitory manner and provide the computer programs and any associated data, data files and data structures to a processor or computer so that the processor or computer can execute the computer program. The computer program in the above-mentioned computer-readable storage medium can be run in an environment deployed in a computer device such as a client, a host, an agent device, a server, etc. In addition, in one example, the computer program and any associated data, data files and data structures are distributed on a networked computer system, so that the computer program and any associated data, data files and data structures are stored, accessed and executed in a distributed manner by one or more processors or computers.

[0074] According to an exemplary embodiment of the present disclosure, a computer program product may also be provided, including computer instructions, which may be executed by at least one processor to implement the bitmap scoring-based search method according to an exemplary embodiment of the present invention.

[0075] According to an exemplary embodiment of the present invention, a bitmap scoring DSL can be additionally constructed based on the architecture of coarse sorting and recall, and the matching type between the searched documents and the search keywords can be obtained after parsing the query results in the subsequent fine sorting operation, so as to meet the business-specific fine sorting requirements and the subsequent iterative custom scoring requirements, and in the case of an open source search engine such as ElasticSearch, the search engine does not need to be customized and developed, saving development and operation and maintenance costs; in addition, in the case of parallel DSL execution, the total time consumed for a single search will not increase, and because the search engine will have a local memory cache for various filtering conditions, the actual load of the search engine will not increase significantly.

[0076] While the invention has been shown and described with reference to the particular exemplary embodiments, it will be understood by those skilled in the art that various changes in form and details may be made without departing from the spirit and scope of the invention as defined by the claims and their equivalents.

Claims

1. A search method based on bitmap scoring, comprising: Preprocess the search keywords; Based on the preprocessed search keywords, a plurality of domain specific language DSL query statements with a relevance scoring algorithm are obtained according to predetermined dimensions; Obtaining a bitmap scoring DSL query statement capable of identifying a matching type based on the DSL query statement respectively; Obtaining search results for the search keyword based on the DSL query statement and the bitmap scoring DSL query statement; The step of obtaining a bitmap scoring DSL query statement capable of identifying a matching type based on the DSL query statement comprises: The relevance scoring algorithm in the DSL query statement is replaced with a constant scoring algorithm based on bitmap encoding to obtain a bitmap scoring DSL query statement that can identify the matching type. Among them, the matching type represents the type of matching relationship between the searched document and the search keyword, the bitmap code is used to store different values ​​of multiple matching types, and the constant scoring algorithm based on the bitmap code is used to assign different values ​​as scores to multiple matching types based on the records of the bitmap code.

2. The bitmap scoring-based search method according to claim 1, wherein: The multiple matching types include at least one of content full text matching, content phrase matching, title full text matching, and title phrase matching.

3. The bitmap scoring-based search method according to claim 1, wherein: The step of obtaining the search results of the search keyword comprises: Obtaining a first search result for the search keyword based on the DSL query statement, and obtaining a second search result for the search keyword based on the bitmap scoring DSL query statement, wherein the first search result includes at least one searched document and a corresponding relevance score, and the second search result includes the at least one searched document and a corresponding match type score; Assigning different weights to the relevance score of the document and the matching type score of the document respectively to obtain a final score of the document; The search result of the search keyword is obtained based on the at least one searched document and the corresponding final score.

4. The bitmap scoring-based search method according to claim 3, characterized in that: The weight of the match type score of a document is greater than the weight of the relevance score of the document.

5. A search device based on bitmap scoring, comprising: A preprocessing unit, configured to preprocess the search keywords; A query statement obtaining unit is configured to obtain a plurality of domain specific language (DSL) query statements with a relevance scoring algorithm based on the preprocessed search keywords according to a predetermined dimension; A bitmap scoring query statement obtaining unit is configured to obtain a bitmap scoring DSL query statement capable of identifying a matching type based on the DSL query statement respectively; A search unit configured to obtain search results of the search keyword based on the DSL query statement and the bitmap scoring DSL query statement; The bitmap scoring query statement obtaining unit is further configured to replace the relevance scoring algorithm in the DSL query statement with a constant scoring algorithm based on bitmap coding, respectively, to obtain a bitmap scoring DSL query statement capable of identifying a matching type. Among them, the matching type represents the type of matching relationship between the searched document and the search keyword, the bitmap code is used to store different values ​​of multiple matching types, and the constant scoring algorithm based on the bitmap code is used to assign different values ​​as scores to multiple matching types based on the records of the bitmap code.

6. The bitmap scoring-based search device according to claim 5, characterized in that: The multiple matching types include at least one of content full text matching, content phrase matching, title full text matching, and title phrase matching.

7. The bitmap scoring-based search device according to claim 5, characterized in that: The search unit is further configured to perform the following operations: Obtaining a first search result for the search keyword based on the DSL query statement, and obtaining a second search result for the search keyword based on the bitmap scoring DSL query statement, wherein the first search result includes at least one searched document and a corresponding relevance score, and the second search result includes the at least one searched document and a corresponding match type score; Assigning different weights to the relevance score of the document and the matching type score of the document respectively to obtain a final score of the document; The search result of the search keyword is obtained based on the at least one searched document and the corresponding final score.

8. The bitmap scoring-based search device according to claim 7, characterized in that: The weight of the match type score of a document is greater than the weight of the relevance score of the document.

9. An electronic device comprising a memory and a processor, wherein the memory stores computer executable instructions, and when the instructions are executed by the processor, the bitmap scoring-based search method described in any one of claims 1 to 4 is executed.

10. A computer-readable storage medium having computer-executable instructions stored thereon, wherein when the instructions are executed, the bitmap scoring-based search method according to any one of claims 1 to 4 is executed.

11. A computer program product, comprising computer instructions, wherein when the computer instructions are executed by at least one processor, the bitmap scoring-based search method according to any one of claims 1 to 4 is implemented.

Citation Information

Patent Citations

  • Techniques for reformulating search queries

    CN106030569A

  • DSL query method based on Elasticsearch

    CN106528797A