Data query method and device, electronic equipment, storage medium and program product
By automatically switching query mode by detecting the status information of the query component, the problem of single query mode in the prior art is solved, and the efficiency and user experience of data query are improved.
Patent Information
- Application Number
- CN202310752417.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-06-25
- Publication Date
- 2024-12-27
AI Technical Summary
The query mode of the existing data query method is relatively single, and it is impossible to automatically switch between multiple query modes, which increases the user's operational burden.
By detecting the status information of the query component input area in the page, the current query mode is determined, and the query component style and data query results are updated according to the mode, so as to realize automatic switching of the query mode.
It reduces the cognitive burden of users, improves the efficiency of user data query, and simplifies the query operation process.
Smart Images

Figure CN119201993A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of data query, and in particular to a method, device, electronic device, storage medium and program product for data query. Background Art
[0002] At present, the query modes of common data query methods are relatively single and cannot achieve automatic switching between multiple query modes, which increases the user's operational burden. Summary of the invention
[0003] In view of this, the purpose of the present application is to propose a data query method, device, electronic device, storage medium and program product to achieve automatic switching of query modes.
[0004] Based on the above purpose, the present application provides a data query method, including:
[0005] Detecting state information of an input area in a query component in a page; the state information includes content information of the input area;
[0006] determining a current query mode based on the state information;
[0007] Based on the determined query mode, updating the query component style;
[0008] In response to receiving a query instruction for the query component, determining a data query result based on the determined query mode and / or the content information;
[0009] Output the data query result.
[0010] Based on the same inventive concept, the exemplary embodiment of the present application further provides a data query device, including:
[0011] A detection module, detecting state information of an input area in a query component in a page; the state information includes content information of the input area;
[0012] An adjustment module, which determines a current query mode based on the state information;
[0013] An updating module, based on the determined query mode, updates the query component style;
[0014] a determination module, in response to receiving a query instruction for the query component, determining a data query result based on the determined query mode and / or the content information;
[0015] An output module outputs the data query result.
[0016] Based on the same inventive concept, an exemplary embodiment of the present application also provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable by the processor, wherein the processor implements the data query method as described above when executing the program.
[0017] Based on the same inventive concept, an exemplary embodiment of the present application further provides a non-transitory computer-readable storage medium, wherein the non-transitory computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a computer to execute the data query method as described above.
[0018] Based on the same inventive concept, an exemplary embodiment of the present application further provides a computer program product, including computer program instructions. When the computer program instructions are executed on a computer, the computer executes the data query method as described above.
[0019] As can be seen from the above, the data query method, device, electronic device, storage medium and program product provided by the present application detect the status information of the input area in the query component in the page; the status information includes the content information of the input area; determine the current query mode based on the status information; update the query component style based on the determined query mode; in response to receiving a query instruction for the query component, determine the data query result based on the determined query mode and / or the content information; output the data query result, so that the query mode can be adjusted in real time according to the status of the input area in the query component, automatic switching of the query mode is realized, and the corresponding query result is fed back according to the switched query mode, which reduces the user's cognitive burden, improves the efficiency of user data query, and simplifies the query operation process. BRIEF DESCRIPTION OF THE DRAWINGS
[0020] In order to more clearly illustrate the technical solutions in the present application or related technologies, the drawings required for use in the embodiments or related technical descriptions are briefly introduced below. Obviously, the drawings described below are only embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0021] Figure 1 A schematic diagram of an application scenario of an embodiment of the present application;
[0022] Figure 2 A flowchart of a data query method according to an embodiment of the present application;
[0023] Figure 3 This is a schematic diagram of the structure of the first query component in an embodiment of the present application;
[0024] Figure 4This is a schematic diagram of the structure of the second query component in an embodiment of the present application;
[0025] Figure 5 This is a schematic diagram of the structure of the third query component in an embodiment of the present application;
[0026] Figure 6 This is a schematic diagram of the structure of the fourth query component in an embodiment of the present application;
[0027] Figure 7 This is a schematic diagram of the structure of the fifth query component in an embodiment of the present application;
[0028] Figure 8 This is a schematic diagram of the structure of the sixth query component in an embodiment of the present application;
[0029] Fig. 9 This is a schematic diagram of the structure of the seventh query component in an embodiment of the present application;
[0030] Fig.10 A schematic diagram of the structure of a data query device according to an embodiment of the present application;
[0031] Fig.11 A schematic diagram of the structure of a specific electronic device according to an embodiment of the present application. DETAILED DESCRIPTION
[0032] In order to make the purpose, technical solutions and advantages of this specification more clear, this specification is further described in detail below in combination with specific embodiments and with reference to the accompanying drawings.
[0033] It is understandable that before using the technical solutions disclosed in the embodiments of this application, the categories, scope of use, usage scenarios, etc. of the personal information involved in this application should be informed to the user and the user's authorization should be obtained in an appropriate manner in accordance with relevant laws and regulations.
[0034] It is understandable that the data involved in this technical solution (including but not limited to the data itself, the acquisition or use of the data) shall comply with the requirements of relevant laws, regulations and relevant provisions.
[0035] In order to make the purpose, technical solutions and advantages of this specification more clear, this specification is further described in detail below in combination with specific embodiments and with reference to the accompanying drawings.
[0036] It should be noted that, unless otherwise defined, the technical terms or scientific terms used in the embodiments of the present application should be understood by people with ordinary skills in the field to which the present application belongs. The "first", "second" and similar words used in the embodiments of the present application do not represent any order, quantity or importance, but are only used to distinguish different components. "Including" or "comprising" and similar words mean that the elements, objects or method steps appearing before the word cover the elements, objects or method steps listed after the word and their equivalents, without excluding other elements, objects or method steps. "Connect" or "connected" and similar words are not limited to physical or mechanical connections, but can include electrical connections, whether direct or indirect. "Up", "down", "left", "right" and the like are only used to indicate relative positional relationships. When the absolute position of the described object changes, the relative positional relationship may also change accordingly.
[0037] As described in the background technology section, the query mode of the data query method in the current related technology is relatively single, and it is impossible to achieve automatic switching of multiple query modes, which increases the user's operation burden.
[0038] In the above-mentioned actual situation, the present application provides a method for data query, which detects the status information of the input area in the query component in the page; the status information includes the content information of the input area; determines the current query mode based on the status information; determines the current query mode based on the status information; in response to receiving a query instruction for the query component, determines the data query result based on the determined query mode and / or the content information; outputs the data query result, so that the query mode can be adjusted in real time according to the status of the input area in the query component, and the query mode is automatically switched, and the corresponding query result is fed back according to the switched query mode, which reduces the user's cognitive burden, improves the efficiency of the user's data query, and simplifies the query operation process.
[0039] After introducing the basic principles of the present application, various non-limiting implementation methods of the present application are described in detail below.
[0040] In some specific application scenarios, the data query method of the present application can be applied to various platforms or systems involving data query. As an example, the application scenario includes at least one server and at least one terminal. The server and the terminal can communicate through a network to achieve data transmission. Among them, the network can be a wired network or a wireless network, which is not specifically limited in the present application.
[0041] The server can be a server that provides various services. Specifically, the server can be used to provide background services for applications running on the terminal. Optionally, in some implementations, the method for data query provided in the embodiment of the present application can be executed by a server or a terminal. The server can be hardware or software. When the server is hardware, it can be implemented as a distributed server cluster consisting of multiple servers, or it can be implemented as a single server. When the server is software, it can be implemented as multiple software or software modules (for example, software or software modules used to provide distributed services), or it can be implemented as a single software or software module. The embodiment of the present application does not specifically limit this.
[0042] refer to Figure 1 , which is a schematic diagram of an application scenario of the data query method provided by the exemplary embodiment of the present application. The application scenario includes a terminal device 101, a server 102, and a data storage system 103. Among them, the terminal device 101, the server 102 and the data storage system 103 can be connected through a wired or wireless communication network. The terminal device 101 includes but is not limited to a desktop computer, a mobile phone, a mobile computer, a tablet computer, a media player, a smart wearable device, a personal digital assistant (PDA) or other electronic devices capable of realizing the above functions. The server 102 and the data storage system 103 can both be independent physical servers, or a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, CDN, and big data and artificial intelligence platforms.
[0043] The server 102 is used to provide data query services to the user of the terminal device 101. The terminal device 101 is installed with a client that communicates with the server 102, and the user can obtain data through the client. During the data query process, the server 102 can adjust the current query mode according to the state information of the input area in the query component, and determine the data query result according to the adjusted query mode and the content information of the input area. Optionally, the data query process can also be completed by the client, which is not limited.
[0044] The data storage system 103 stores various data related to data query. Both the terminal device 101 and the server 102 can randomly retrieve various data from the data storage system 103 .
[0045] Combine the following Figure 1The data query method according to the exemplary embodiment of the present application is described by using the application scenario. It should be noted that the above application scenario is only shown to facilitate understanding of the spirit and principle of the present application, and the implementation of the present application is not limited in this respect. On the contrary, the implementation of the present application can be applied to any applicable scenario.
[0046] refer to Figure 2 The present invention provides a method for querying data, which includes the following steps:
[0047] S101, detecting state information of an input area in a query component in a page; the state information includes content information of the input area.
[0048] In specific implementation, the state information of the input area in the query component in the page can be detected first; the state information includes the content information of the input area. Optionally, the detection can be implemented, or a specific method for triggering the detection can be set as needed, without limitation. For example, when an input cursor appears in the input area, the detection is started. Optionally, the state information of the input area can be whether the input area has content input or no content input, or other states, without limitation. It should be noted that the content information of the input area can be specific input content or blank information, without limitation.
[0049] S102: Determine a current query mode based on the status information.
[0050] In specific implementation, after obtaining the state information of the input area of the query component, the current query mode can be determined according to the state information.
[0051] In some embodiments, determining the current query mode based on the state information specifically includes:
[0052] In response to determining that the state information indicates that no content is input in the input area, determining the current query mode to be an exploration mode for performing a full query;
[0053] In response to determining that the state information is content input into the input area, the current query mode is determined as a search mode for performing a matching query.
[0054] In specific implementation, the query mode includes an exploration mode for full query and a search mode for matching query. When it is determined that the status information is that no content is input in the input area, the current query mode is determined to be an exploration mode for full query; when it is determined that content is input in the input area, the current query mode is determined to be a search mode for matching query, thereby realizing automatic switching between the exploration mode and the search mode. Figure 3, when there is no content input in the input area (query box) of the query component, the corresponding query mode is exploration mode. Figure 4 When the query content is entered in the input area (query box) in the query component, the corresponding query mode is the search mode.
[0055] In some embodiments, in response to determining that the state information is content input in the input area, determining the current query mode as a search mode for performing a matching query specifically includes:
[0056] Determining the input style of the content information; wherein the search mode includes exact search and fuzzy search;
[0057] In response to determining that the input pattern is a multi-line input, determining the search mode to be an exact search;
[0058] In response to determining that the input pattern is a single-line input, the search mode is determined to be a fuzzy search.
[0059] In specific implementation, the search mode can be further divided into precise search and fuzzy search, wherein precise search means that the matched query data results are completely identical or overlapped with the input content information, and fuzzy search means that the matched query data results are at least partially identical or overlapped with the input content information. Generally, fuzzy search belongs to broad query and precise search belongs to precise query. Considering that when the content input by the user is multi-line input, that is, the user wants to query the results of multiple data at the same time, generally, the user wants precise results. Therefore, when the input style is determined to be multi-line input, the search mode is determined to be precise search. At the same time, considering that when the content input by the user is single-line input, that is, the user wants to query the results of a single data, multiple query results can be fed back to the user so that the user can choose from them. Therefore, when the input style is determined to be single-line input, the search mode is determined to be fuzzy search. Optionally, the multiple data query results fed back can be sorted as needed.
[0060] S103: Update the query component style based on the determined query mode.
[0061] In specific implementation, in order to facilitate the user to intuitively understand the current query mode, after determining the current query mode based on the state information, the query component style can be updated according to the determined query mode. Figure 3 and Figure 4 , the query component style corresponding to the current query mode can be directly represented by text. Optionally, other display modes can be set as needed to display the query component style, and there is no limitation on this.
[0062] S104: In response to receiving a query instruction for the query component, determine a data query result based on the determined query mode and / or the content information.
[0063] In specific implementation, after determining the current query mode, when receiving a query instruction for the query component, the data query result can be determined based on the adjusted query mode and the content information at the same time, or the data query result can be determined based on the determined query mode alone, or the data query result can be determined based on the content information alone. Optionally, the query instruction for the query component can be issued through the query control on the query component, refer to Figure 3 You can also directly enter content in the input area and press the spacebar or other preset keys to launch the exploration control. There is no limitation on this.
[0064] In some embodiments, determining a data query result based on the determined query mode and / or the content information specifically includes:
[0065] In response to determining the current query mode as a search mode for performing a matching query, determining an input pattern of the content information;
[0066] In response to determining that the input style is a multi-line input, determining a single line of content corresponding to each line of input in the content information, and for each single line of content, determining a data query result matching the single line of content;
[0067] In response to determining that the input style is a single-line input, a data query result matching the content information is determined.
[0068] In specific implementation, when it is determined that the input style is multi-line input, it means that the content information in the input area includes multiple lines of content corresponding to multiple target results, that is, each line of content corresponds to at least one data query result. Therefore, the single line of content corresponding to each line of input in the content information is determined, and for each single line of content, the data query result matching the single line of content is determined. When it is determined that the input style is single-line input, it means that the content information in the input area only includes a single line of content corresponding to one target result. At this time, the data query result matching the content information is determined. Reference Figure 5 , where the input style of the input area is multi-line input (four-line input), and each corresponding line of input content will determine the query result that matches it.
[0069] In some embodiments, after determining the input style of the content information, the method further includes:
[0070] In response to determining that the input style is a multi-line input, the content information is displayed in separate lines in the input area.
[0071] In specific implementation, in order to facilitate the user to intuitively determine whether the current input is multi-line or single-line, and to accurately know the content corresponding to each line of the multi-line input, when the input style is determined to be multi-line input, the content information is displayed in separate lines in the input area. Optionally, the content can be displayed in separate lines according to the content corresponding to each line of input. Figure 5 , where the input content information is divided into four lines. Optionally, in order to improve the display effect, refer to Figure 6 , you can add a label in front of the content corresponding to each line of input, and at the same time, add a label in front of the data query results, so that users can better distinguish the data query results that match the content corresponding to each line of input.
[0072] In some embodiments, determining a data query result based on the determined query mode and / or the content information specifically includes:
[0073] In response to determining the current query mode as an exploratory mode for performing a full query, all data in the database corresponding to the query component are determined as data query results.
[0074] In specific implementation, when the current query mode is determined as an exploration mode for full query, all data in the database corresponding to the query component can be determined as data query results. Optionally, all the data can be sorted as needed to facilitate users to quickly find their query targets.
[0075] In some embodiments, determining the input style of the content information specifically includes:
[0076] In response to determining that the content information includes a plurality of entries and a preset instruction is input between adjacent entries, determining that the input style is a multi-line input;
[0077] In response to determining that the content information includes a single word, or that the content information includes multiple words and no preset instruction is input between adjacent words, the input style is determined to be single-line input.
[0078] In specific implementation, when it is determined that the content information includes multiple entries and a preset instruction is input between adjacent entries, the input style is determined to be multi-line input; when it is determined that the content information includes a single entry, or the content information includes multiple entries and the preset instruction is not input between adjacent entries, the input style is determined to be single-line input. Optionally, the preset instruction can be set as needed, and there is no limitation on this. For example, the preset instruction is set to "shift+Enter", or the space bar, etc.
[0079] In some embodiments, the step of determining the preset instruction includes:
[0080] Obtaining all input instructions included in the database corresponding to the query component;
[0081] The preset instruction is determined based on all the input instructions so that the preset instruction does not overlap with all the input instructions.
[0082] In specific implementation, when determining the preset instruction, all input instructions included in the database corresponding to the query component can be obtained first, and then the preset instruction can be determined based on all the input instructions, so that the preset instruction does not overlap with all the input instructions, thereby solving the problem that some characteristic symbols cannot be searched due to setting common separators as preset instructions.
[0083] In some embodiments, determining the input style of the content information specifically includes:
[0084] In response to determining that the content information includes a plurality of entries and a preset instruction is input between adjacent entries, determining whether a database corresponding to the query component includes target data matching the content information;
[0085] In response to determining that the database corresponding to the query component includes the target data, outputting prompt information; wherein the prompt information is used to determine whether the current query mode is the single-line input;
[0086] In response to receiving a confirmation instruction for the prompt information, the input style is determined as single-line input.
[0087] During specific implementation, it is considered that the setting of preset instructions should not only avoid overlap with instructions already included in the database, but also facilitate user input. At the same time, if the database is dynamically updated, it is difficult to ensure that the preset instructions do not overlap with instructions already included in the database. Therefore, in some embodiments, when it is determined that the content information includes multiple entries and preset instructions are input between adjacent entries, it is further determined whether the database corresponding to the query component includes target data that matches the content information. If not, the input style can be directly determined as multi-line input. If included, a prompt message is output; wherein the prompt message is used to determine whether the current query mode is the single-line input; the user determines whether the input style of the currently input content information is a single-line input through the prompt message, and when a confirmation instruction for the prompt message is received, the input style is determined as a single-line input. Reference Figure 7 , because the input content information includes two entries, and there is a ";" between the two entries, that is, the preset instruction at this time is ";", so the prompt message "Is the current query mode single-line input?" is output. When the confirmation instruction issued by the user is received, that is, the user clicks Figure 7 The "yes" control in the input style is determined as a single-line input. Figure 8 , "AAAAAAAAAA; BBBBBBBBBB" is determined as a single line input. When a denial instruction is received from the user, that is, the user clicks Figure 7 If the "No" control is selected, the input style is determined as a multi-line input. Fig. 9 , the input content information will be displayed in multiple lines (two lines).
[0088] S105: output the data query result.
[0089] In specific implementation, after determining the data query result, the data query result is output. Optionally, the data query result can be directly output on the page, or the data query result can be output to a specified device, which is not limited.
[0090] The data query method, device, electronic device, storage medium and program product provided by the present application detect the status information of the input area in the query component in the page; the status information includes the content information of the input area; determine the current query mode based on the status information; update the query component style based on the determined query mode; in response to receiving a query instruction for the query component, determine the data query result based on the determined query mode and / or the content information; output the data query result, so that the query mode can be adjusted in real time according to the status of the input area in the query component, realize automatic switching of the query mode, and feedback the corresponding query result according to the switched query mode, thereby reducing the user's cognitive burden, improving the efficiency of the user's data query, and simplifying the query operation process.
[0091] It should be noted that the method of the embodiment of the present application can be performed by a single device, such as a computer or server. The method of the embodiment of the present application can also be applied to a distributed scenario and completed by multiple devices cooperating with each other. In the case of such a distributed scenario, one of the multiple devices can only perform one or more steps in the method of the embodiment of the present application, and the multiple devices will interact with each other to complete the described method.
[0092] It should be noted that the above describes specific embodiments of the present application. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recorded in the claims can be performed in an order different from that in the above embodiments and still achieve the desired results. In addition, the processes depicted in the accompanying drawings do not necessarily require the specific order or continuous order shown to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.
[0093] Based on the same inventive concept, corresponding to any of the above-mentioned embodiment methods, the present application also provides a data query device.
[0094] refer to Fig.10 , the data query device comprises:
[0095] A detection module 201 detects state information of an input area in a query component in a page; the state information includes content information of the input area;
[0096] An adjustment module 202 determines a current query mode based on the state information;
[0097] An updating module 203 updates a query component style based on the determined query mode;
[0098] A determination module 204, in response to receiving a query instruction for the query component, determines a data query result based on the determined query mode and / or the content information;
[0099] The output module 205 outputs the data query result.
[0100] In some embodiments, the adjustment module is specifically used to:
[0101] In response to determining that the state information indicates that no content is input in the input area, determining the current query mode to be an exploration mode for performing a full query;
[0102] In response to determining that the state information is content input into the input area, the current query mode is determined as a search mode for performing a matching query.
[0103] In some embodiments, the adjustment module is specifically used to:
[0104] Determining the input style of the content information; wherein the search mode includes exact search and fuzzy search;
[0105] In response to determining that the input pattern is a multi-line input, determining the search mode to be an exact search;
[0106] In response to determining that the input pattern is a single-line input, the search mode is determined to be a fuzzy search.
[0107] In some embodiments, the determining module is specifically used to:
[0108] In response to determining the current query mode as a search mode for performing a matching query, determining an input pattern of the content information;
[0109] In response to determining that the input style is a multi-line input, determining a single line of content corresponding to each line of input in the content information, and for each single line of content, determining a data query result matching the single line of content;
[0110] In response to determining that the input style is a single-line input, a data query result matching the content information is determined.
[0111] In some embodiments, the determining module is specifically used to:
[0112] In response to determining the current query mode as an exploratory mode for performing a full query, all data in the database corresponding to the query component are determined as data query results.
[0113] In some embodiments, the adjustment module is further configured to:
[0114] In response to determining that the content information includes a plurality of entries and a preset instruction is input between adjacent entries, determining that the input style is a multi-line input;
[0115] In response to determining that the content information includes a single word, or that the content information includes multiple words and no preset instruction is input between adjacent words, the input style is determined to be single-line input.
[0116] In some embodiments, the device further comprises a first display module, configured to:
[0117] In response to determining that the input style is a multi-line input, the content information is displayed in separate lines in the input area.
[0118] In some embodiments, the adjustment module is further configured to:
[0119] Obtaining all input instructions included in the database corresponding to the query component;
[0120] The preset instruction is determined based on all the input instructions so that the preset instruction does not overlap with all the input instructions.
[0121] In some embodiments, the adjustment module is further configured to:
[0122] In response to determining that the content information includes a plurality of entries and a preset instruction is input between adjacent entries, determining whether a database corresponding to the query component includes target data matching the content information;
[0123] In response to determining that the database corresponding to the query component includes the target data, outputting prompt information; wherein the prompt information is used to determine whether the current query mode is the single-line input;
[0124] In response to receiving a confirmation instruction for the prompt information, the input style is determined as single-line input.
[0125] In some embodiments, the device further comprises a second display module, configured to:
[0126] The query component displays an adjustment result of adjusting the query mode.
[0127] The data query device of the above embodiment is used to implement the corresponding data query method in any of the above embodiments, and has the beneficial effects of the corresponding data query method embodiment, which will not be described in detail here.
[0128] Based on the same inventive concept, corresponding to any of the above-mentioned embodiments and methods, the present application also provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, the data query method described in any of the above embodiments is implemented.
[0129] Fig.11 A more specific schematic diagram of the hardware structure of an electronic device provided in this embodiment is shown, and the device may include: a processor 1010, a memory 1020, an input / output interface 1030, a communication interface 1040, and a bus 1050. The processor 1010, the memory 1020, the input / output interface 1030, and the communication interface 1040 are connected to each other through the bus 1050 in the device.
[0130] The processor 1010 can be implemented by a general-purpose CPU (Central Processing Unit), a microprocessor, an application-specific integrated circuit (ASIC), or one or more integrated circuits, and is used to execute relevant programs to implement the technical solutions provided in the embodiments of this specification.
[0131] The memory 1020 may be implemented in the form of ROM (Read Only Memory), RAM (Random Access Memory), static storage device, dynamic storage device, etc. The memory 1020 may store an operating system and other application programs. When the technical solutions provided in the embodiments of this specification are implemented by software or firmware, the relevant program codes are stored in the memory 1020 and are called and executed by the processor 1010.
[0132] The input / output interface 1030 is used to connect the input / output module to realize information input and output. The input / output module can be configured in the device as a component (not shown in the figure), or it can be externally connected to the device to provide corresponding functions. The input device may include a keyboard, a mouse, a touch screen, a microphone, various sensors, etc., and the output device may include a display, a speaker, a vibrator, an indicator light, etc.
[0133] The communication interface 1040 is used to connect a communication module (not shown) to realize communication interaction between the device and other devices. The communication module can realize communication through a wired mode (such as USB, network cable, etc.) or a wireless mode (such as mobile network, WIFI, Bluetooth, etc.).
[0134] The bus 1050 includes a path that transmits information between the various components of the device (eg, the processor 1010, the memory 1020, the input / output interface 1030, and the communication interface 1040).
[0135] It should be noted that, although the above device only shows the processor 1010, the memory 1020, the input / output interface 1030, the communication interface 1040 and the bus 1050, in the specific implementation process, the device may also include other components necessary for normal operation. In addition, it can be understood by those skilled in the art that the above device may also only include the components necessary for implementing the embodiments of the present specification, and does not necessarily include all the components shown in the figure.
[0136] The electronic device of the above embodiment is used to implement the corresponding data query method in any of the above embodiments, and has the beneficial effects of the corresponding method embodiment, which will not be described in detail here.
[0137] Based on the same inventive concept, corresponding to any of the above-mentioned embodiment methods, the present application also provides a non-transitory computer-readable storage medium, wherein the non-transitory computer-readable storage medium stores computer instructions, and the computer instructions are used to enable the computer to execute the data query method described in any of the above embodiments.
[0138] The computer-readable medium of this embodiment includes permanent and non-permanent, removable and non-removable media, and information storage can be implemented by any method or technology. Information can be computer-readable instructions, data structures, modules of programs, or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, read-only compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, tape disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device.
[0139] The computer instructions stored in the storage medium of the above embodiments are used to enable the computer to execute the data query method described in any of the above embodiments, and have the beneficial effects of the corresponding method embodiments, which will not be repeated here.
[0140] Based on the same inventive concept, corresponding to any of the above-mentioned embodiments and methods, the present disclosure further provides a computer program product, which includes a computer program. In some embodiments, the computer program is executed by one or more processors so that the processors execute the data query method described in the above-mentioned embodiments, and has the beneficial effects of the corresponding method embodiments, which will not be repeated here.
[0141] Those skilled in the art should understand that the discussion of any of the above embodiments is merely illustrative and is not intended to imply that the scope of the present application (including the claims) is limited to these examples; based on the concept of the present application, the technical features in the above embodiments or different embodiments may be combined, the steps may be implemented in any order, and there are many other variations of the different aspects of the embodiments of the present application as described above, which are not provided in detail for the sake of simplicity.
[0142] In addition, to simplify the description and discussion, and in order not to make the embodiments of the present application difficult to understand, the known power supply / ground connection with the integrated circuit (IC) chip and other components may or may not be shown in the provided drawings. In addition, the device can be shown in the form of a block diagram to avoid making the embodiments of the present application difficult to understand, and this also takes into account the fact that the details of the implementation of these block diagram devices are highly dependent on the platform to be implemented in the embodiments of the present application (that is, these details should be fully within the scope of understanding of those skilled in the art). In the case of elaborating specific details (e.g., circuits) to describe exemplary embodiments of the present application, it is obvious to those skilled in the art that the embodiments of the present application can be implemented without these specific details or when these specific details are changed. Therefore, these descriptions should be considered to be illustrative rather than restrictive.
[0143] Although the present application has been described in conjunction with specific embodiments of the present application, many replacements, modifications and variations of these embodiments will be apparent to those skilled in the art from the foregoing description. For example, other memory architectures (e.g., dynamic RAM (DRAM)) may use the embodiments discussed.
[0144] The embodiments of the present application are intended to cover all such substitutions, modifications and variations that fall within the broad scope of the appended claims. Therefore, any omissions, modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the embodiments of the present application should be included in the scope of protection of the present application.
Claims
1. A data query method, characterized in that: include: Detect the status information of the input area in the query component in the page; The state information includes content information of the input area; determining a current query mode based on the state information; Based on the determined query mode, updating the query component style; In response to receiving a query instruction for the query component, determining a data query result based on the determined query mode and / or the content information; The data query result is output.
2. The method according to claim 1, characterized in that Determining a current query mode based on the state information specifically includes: In response to determining that the state information indicates that no content is input in the input area, determining the current query mode to be an exploration mode for performing a full query; In response to determining that the state information is content input into the input area, the current query mode is determined as a search mode for performing a matching query.
3. The method according to claim 2, characterized in that In response to determining that the state information is content input in the input area, determining the current query mode as a search mode for performing a matching query specifically includes: Determining the input style of the content information; wherein the search mode includes exact search and fuzzy search; In response to determining that the input pattern is a multi-line input, determining the search mode to be an exact search; In response to determining that the input pattern is a single-line input, the search mode is determined to be a fuzzy search.
4. The method according to claim 2, characterized in that: Determining a data query result based on the determined query mode and / or the content information specifically includes: In response to determining the current query mode as a search mode for performing a matching query, determining an input pattern of the content information; In response to determining that the input style is a multi-line input, determining a single line of content corresponding to each line of input in the content information, and for each single line of content, determining a data query result matching the single line of content; In response to determining that the input style is a single-line input, a data query result matching the content information is determined.
5. The method according to claim 2, characterized in that: Determining a data query result based on the determined query mode and / or the content information specifically includes: In response to determining the current query mode as an exploratory mode for performing a full query, all data in the database corresponding to the query component are determined as data query results.
6. The method according to claim 3 or 4, characterized in that: Determining the input style of the content information specifically includes: In response to determining that the content information includes a plurality of entries and a preset instruction is input between adjacent entries, determining that the input style is a multi-line input; In response to determining that the content information includes a single word, or that the content information includes multiple words and no preset instruction is input between adjacent words, the input style is determined to be single-line input.
7. The method according to claim 3 or 4, characterized in that: After determining the input style of the content information, the method further includes: In response to determining that the input style is a multi-line input, the content information is displayed in separate lines in the input area.
8. The method according to claim 6, characterized in that The step of determining the preset instruction comprises: Obtaining all input instructions included in the database corresponding to the query component; The preset instruction is determined based on all the input instructions so that the preset instruction does not overlap with all the input instructions.
9. The method according to claim 3 or 4, characterized in that: Determining the input style of the content information specifically includes: In response to determining that the content information includes a plurality of entries and a preset instruction is input between adjacent entries, determining whether a database corresponding to the query component includes target data matching the content information; In response to determining that the database corresponding to the query component includes the target data, outputting prompt information; wherein the prompt information is used to determine whether the current query mode is the single-line input; In response to receiving a confirmation instruction for the prompt information, the input style is determined as single-line input.
10. A data query device, characterized in that: include: A detection module detects status information of an input area in a query component in a page; The state information includes content information of the input area; An adjustment module, which determines a current query mode based on the state information; An updating module, based on the determined query mode, updates the query component style; a determination module, in response to receiving a query instruction for the query component, determining a data query result based on the determined query mode and / or the content information; An output module outputs the data query result.
11. An electronic device, characterized in that: The method comprises a memory, a processor, and a computer program stored in the memory and executable by the processor, wherein the processor implements the method according to any one of claims 1 to 9 when executing the program.
12. A non-transitory computer-readable storage medium, characterized in that: The non-transitory computer-readable storage medium stores computer instructions for causing a computer to execute the method according to any one of claims 1 to 9.
13. A computer program product, characterized in that The method comprises computer program instructions, which, when executed on a computer, cause the computer to execute the method according to any one of claims 1 to 9.
Citation Information
Cited By
Data query method and apparatus, electronic device, storage medium, and program product
EP4733958A1
Data query method and apparatus, electronic device, storage medium, and program product
WO2025005878A1