Data scanning method, apparatus, device, storage medium, and product

CN122711684APending Publication Date: 2026-09-08BEIJING HONGTENG INTELLIGENT TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510265375.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-03-06
Publication Date
2026-09-08

AI Technical Summary

Technical Problem

因此,存在一些数据扫描任务由于命中结果过多,导致任务耗时过长,任务执行效率偏低,影响用户及时获取扫描结果

Benefits of technology

[0078] The data scanning scheme provided in this application includes an interruption mechanism for the data scanning task. Specifically, in response to a data scanning command, the data matching rules corresponding to the target sample data are extracted from the command. The data scanning task is then executed based on these matching rules, i.e., scanning the database storing the sample data to identify target sample data that matches the matching rules. To improve the execution efficiency and reduce task time, this application's scheme does not wait for the entire database scan to complete before ending the data scanning task. Instead, a scanning target is set, and the data scanning task stops when the current scan result meets the target. The current scan result includes at least one target sample data that matches the matching rules. This at least one target sample data is then identified as the target scan result corresponding to the data scanning command. This not only completes the data scanning task earlier, reducing task time and allowing users to obtain the target scan results promptly, but also saves scanning resources.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122711684A_ABST
    Figure CN122711684A_ABST
Patent Text Reader

Abstract

The application discloses a data scanning method and device, equipment, storage medium and product, relates to the technical field of data processing, and discloses that in response to a data scanning instruction, a data matching rule corresponding to target sample data is extracted from the data scanning instruction; a data scanning task is executed based on the data matching rule, the data scanning task refers to scanning a database to determine target sample data meeting the data matching rule, and the database is used for storing sample data; in the case that a current scanning result meets a scanning target, the data scanning task is stopped, the scanning result contains at least one piece of target sample data meeting the data matching rule obtained by current scanning; and the at least one piece of target sample data is determined as target scanning result corresponding to the data scanning instruction. The method can improve the execution efficiency of the data scanning task, reduce the task time consumption, and enable the user to obtain the scanning result in time.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of data processing technology, and in particular to a data scanning method, apparatus, device, storage medium and product. Background Technology

[0002] Data scanning refers to the process of searching, identifying, extracting, or analyzing data in a database. It is commonly used in fields such as data mining and data analysis. For example, it can be used to perform security compliance checks on data, that is, to check whether the data meets specific security standards and regulatory requirements. In the financial industry, for instance, scanning customer transaction data ensures that the storage and use of the data comply with anti-money laundering regulations.

[0003] In related technologies, the data scanning task ends after the database scan is completed. Therefore, some data scanning tasks experience excessively long processing times and low execution efficiency due to too many hits, affecting users' ability to obtain scan results promptly.

[0004] The above content is only used to help understand the technical solution of this application and does not represent an admission that the above content is prior art. Summary of the Invention

[0005] The main objective of this application is to provide a data scanning method, apparatus, device, storage medium, and product that can improve the execution efficiency of data scanning tasks, reduce task time, and enable users to obtain scanning results in a timely manner.

[0006] To achieve the above objectives, this application proposes a data scanning method, the method comprising:

[0007] In response to a data scanning command, extract the data matching rules corresponding to the target sample data from the data scanning command;

[0008] A data scanning task is performed based on the data matching rules. The data scanning task refers to scanning the database to identify target sample data that conforms to the data matching rules. The database is used to store sample data.

[0009] If the current scan results meet the scan target, stop executing the data scanning task. The scan results include at least one target sample data that conforms to the data matching rules obtained from the current scan.

[0010] The at least one target sample data is determined as the target scan result corresponding to the data scan command.

[0011] Optionally, stopping the data scanning task when the current scan results meet the scanning target includes:

[0012] Determine the number of target sample data that match the data matching rules obtained in the current scan;

[0013] Once the number of target sample data obtained from the scan reaches the target number, the data scanning task is stopped.

[0014] Optionally, stopping the data scanning task when the number of target sample data obtained by scanning reaches the target number includes:

[0015] Determine the execution duration of the data scanning task;

[0016] If the number of target sample data obtained by scanning reaches the target number and the execution time exceeds the target time, the data scanning task shall be stopped.

[0017] Optionally, stopping the data scanning task when the current scan results meet the scanning target includes:

[0018] The current scan results are sent to the user terminal so that the user terminal can display the current scan results and a task interruption control, wherein the user terminal is the terminal that sent the data scan command;

[0019] In response to a task interruption command from the user terminal, the execution of the data scanning task is stopped. The task interruption command is sent by the user terminal upon detecting a trigger operation on the task interruption control.

[0020] Optionally, sending the current scan results to the user terminal so that the user terminal displays the current scan results and a task interruption control includes:

[0021] The current scan results are cached in real time;

[0022] In response to a task progress viewing command from the user terminal, task progress information is sent to the user terminal. The task progress information includes cached scan results and the number of target sample data contained in the scan results, so that the user terminal can display the task progress information and the task interruption control.

[0023] Optionally, the database includes multiple data storage areas, which are used to store sample data of corresponding data types; the method further includes:

[0024] In response to the data scanning command, the target type to which the target sample data belongs is extracted from the data scanning command;

[0025] The process of performing a data scanning task based on the data matching rules includes:

[0026] Determine the target storage area corresponding to the target type in the database;

[0027] The target storage area is scanned to identify target sample data that matches the data matching rules.

[0028] Optionally, performing the data scanning task based on the data matching rules includes:

[0029] The data filtering component extracts sample filtering conditions from the data scanning instructions, and based on the sample filtering conditions, filters out multiple sample data that meet the sample filtering conditions from the database.

[0030] The data scanning component performs a data scan on the multiple sample data based on the data matching rules to determine the target sample data that conforms to the data matching rules.

[0031] Optionally, the data scanning instruction is an online scanning instruction, which indicates that the scanning mode of the data scanning task is a streaming scanning mode; the execution of the data scanning task based on the data matching rule includes:

[0032] The data filtering component extracts the sample filtering conditions from the data scanning instruction, queries the database for sample data that meet the sample filtering conditions, and adds the sample identifiers of the queried sample data to the message queue in sequence.

[0033] The data scanning component sequentially retrieves sample identifiers from the message queue, retrieves sample data corresponding to the sample identifiers from the database, scans the retrieved sample data, and determines the retrieved sample data as the target sample data if the retrieved sample data conforms to the data matching rules.

[0034] Optionally, the data scanning instruction is an offline scanning instruction, which indicates that the scanning mode of the data scanning task is a batch scanning mode; the execution of the data scanning task based on the data matching rule includes:

[0035] The data filtering component extracts the sample filtering conditions from the data scanning instruction, queries the database for sample data that meet the sample filtering conditions, and places the sample identifiers of the queried sample data in batches in the cache.

[0036] The data scanning component retrieves sample identifiers in batches from the cache, retrieves sample data corresponding to the sample identifiers in batches from the database, scans the retrieved sample data, and determines the retrieved sample data as the target sample data if the retrieved sample data conforms to the data matching rules.

[0037] Optionally, stopping the data scanning task when the current scan results meet the scanning target includes:

[0038] If the current scan result meets the scan target, the data scanning component sends an interrupt signal to the data filtering component to stop filtering sample data.

[0039] Optionally, the data scanning instruction is an offline scanning instruction; the step of executing the data scanning task based on the data matching rule includes:

[0040] A full database is scanned to identify target sample data that matches the data matching rules. The full database is used to store all sample data from historical moments to the current moment.

[0041] Optionally, the data scanning instruction is an online scanning instruction; the step of executing the data scanning task based on the data matching rule includes:

[0042] The incremental database is scanned to identify target sample data that matches the data matching rules. The incremental database is used to store sample data that has been generated since historical time.

[0043] And / or, data scanning is performed based on the search engine ES to determine target sample data that conforms to the data matching rules, wherein the ES is used to store partial sample data extracted from the full database, and the full database is used to store all sample data from historical time to the current time.

[0044] Furthermore, to achieve the above objectives, this application also proposes a data scanning device, the device comprising:

[0045] The instruction response module is used to extract the data matching rules corresponding to the target sample data from the data scanning instruction in response to the data scanning instruction;

[0046] The task execution module is used to execute a data scanning task based on the data matching rules. The data scanning task refers to scanning the database to determine the target sample data that conforms to the data matching rules. The database is used to store the sample data.

[0047] The task interruption module is used to stop the execution of the data scanning task when the current scan result meets the scanning target. The scan result includes at least one target sample data that conforms to the data matching rule obtained in the current scan.

[0048] The result determination module is used to determine the at least one target sample data as the target scan result corresponding to the data scanning instruction.

[0049] Optionally, the task interruption module includes:

[0050] A quantity determination unit is used to determine the number of target sample data that conform to the data matching rules obtained in the current scan.

[0051] The first interrupt unit is used to stop the data scanning task when the number of target sample data obtained by scanning reaches the target number.

[0052] Optionally, the first interrupt unit is configured to determine the execution time of the data scanning task; and to stop executing the data scanning task if the number of target sample data obtained by scanning reaches the target number and the execution time exceeds the target time.

[0053] Optionally, the task interruption module includes:

[0054] The result sending unit is used to send the current scan result to the user terminal so that the user terminal can display the current scan result and the task interruption control. The user terminal is the terminal that sends the data scanning command.

[0055] The second interrupt unit is used to stop executing the data scanning task in response to a task interruption command from the user terminal, wherein the task interruption command is sent by the user terminal when it detects a trigger operation on the task interruption control.

[0056] Optionally, the result sending unit is configured to cache the current scan results in real time; in response to a task progress viewing instruction from the user terminal, it sends task progress information to the user terminal, the task progress information including the cached scan results and the number of target sample data contained in the scan results, so that the user terminal displays the task progress information and the task interruption control.

[0057] Optionally, the database includes multiple data storage areas, which are used to store sample data of corresponding data types;

[0058] The instruction response module is further configured to, in response to the data scanning instruction, extract the target type to which the target sample data belongs from the data scanning instruction;

[0059] The task execution module is used to determine the target storage area corresponding to the target type in the database; and to perform data scanning on the target storage area to determine the target sample data that meets the data matching rules.

[0060] Optionally, the task execution module includes:

[0061] A sample screening unit is used to extract sample screening conditions from the data scanning instruction through a data screening component, and to screen out multiple sample data that meet the sample screening conditions from the database based on the sample screening conditions.

[0062] A data scanning unit is used to scan the plurality of sample data based on the data matching rules using a data scanning component, so as to determine the target sample data that conforms to the data matching rules.

[0063] Optionally, the data scanning instruction is an online scanning instruction, which indicates that the scanning mode of the data scanning task is a streaming scanning mode;

[0064] The sample screening unit is used to extract the sample screening conditions from the data scanning instruction through the data screening component, query sample data that meets the sample screening conditions from the database, and add the sample identifiers of the queried sample data to the message queue in sequence.

[0065] The data scanning unit is used to sequentially obtain sample identifiers from the message queue and sample data corresponding to the sample identifiers from the database through the data scanning component, scan the obtained sample data, and determine the obtained sample data as the target sample data if the obtained sample data meets the data matching rules.

[0066] Optionally, the data scanning instruction is an offline scanning instruction, which indicates that the scanning mode of the data scanning task is a batch scanning mode; the execution of the data scanning task based on the data matching rule includes:

[0067] The sample screening unit is used to extract the sample screening conditions from the data scanning instruction through the data screening component, query sample data that meets the sample screening conditions from the database, and put the sample identifiers of the queried sample data in batches into the cache.

[0068] The data scanning unit is used to obtain sample identifiers in batches from the cache and sample data corresponding to the sample identifiers in batches from the database through the data scanning component, scan the obtained sample data, and determine the obtained sample data as the target sample data if the obtained sample data meets the data matching rules.

[0069] Optionally, the task interruption module is used to send an interruption signal to the data filtering component when the current scan result meets the scan target, so that the data filtering component stops filtering sample data.

[0070] Optionally, the data scanning instruction is an offline scanning instruction;

[0071] The task execution module is used to scan the full database to identify target sample data that meets the data matching rules. The full database is used to store all sample data from historical moments to the current moment.

[0072] Optionally, the data scanning instruction is an online scanning instruction;

[0073] The task execution module is used to scan the incremental database to determine target sample data that conforms to the data matching rules. The incremental database is used to store newly generated sample data since the historical time. And / or, it scans the data based on the search engine ES to determine target sample data that conforms to the data matching rules. The ES is used to store a portion of the sample data extracted from the full database. The full database is used to store all sample data from the historical time to the current time.

[0074] In addition, to achieve the above objectives, this application also proposes a data scanning device, the device comprising: a memory, a processor, and a computer program stored in the memory and executable on the processor, the computer program being configured to implement the steps of the data scanning method as described above.

[0075] In addition, to achieve the above objectives, this application also proposes a storage medium, which is a computer-readable storage medium, on which a computer program is stored, and which, when executed by a processor, implements the steps of the data scanning method described above.

[0076] In addition, to achieve the above objectives, this application also provides a computer program product, which includes a computer program that, when executed by a processor, implements the steps of the data scanning method described above.

[0077] One or more technical solutions proposed in this application have at least the following technical effects:

[0078] The data scanning scheme provided in this application includes an interruption mechanism for the data scanning task. Specifically, in response to a data scanning command, the data matching rules corresponding to the target sample data are extracted from the command. The data scanning task is then executed based on these matching rules, i.e., scanning the database storing the sample data to identify target sample data that matches the matching rules. To improve the execution efficiency and reduce task time, this application's scheme does not wait for the entire database scan to complete before ending the data scanning task. Instead, a scanning target is set, and the data scanning task stops when the current scan result meets the target. The current scan result includes at least one target sample data that matches the matching rules. This at least one target sample data is then identified as the target scan result corresponding to the data scanning command. This not only completes the data scanning task earlier, reducing task time and allowing users to obtain the target scan results promptly, but also saves scanning resources. Attached Figure Description

[0079] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application.

[0080] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, for those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0081] Figure 1 This is a schematic diagram of an implementation environment for the data scanning method of this application;

[0082] Figure 2 This is a flowchart illustrating the first embodiment of the data scanning method of this application;

[0083] Figure 3 This is a detailed schematic diagram of step S30 in the second embodiment of the data scanning method of this application;

[0084] Figure 4 This is a detailed schematic diagram of step S30 in the third embodiment of the data scanning method of this application;

[0085] Figure 5 This is a detailed schematic diagram of steps S20 and S30 in the fourth embodiment of the data scanning method of this application;

[0086] Figure 6This is a detailed schematic diagram of step S20 in the fifth embodiment of the data scanning method of this application;

[0087] Figure 7 This is a detailed schematic diagram of step S20 in the sixth embodiment of the data scanning method of this application;

[0088] Figure 8 A schematic diagram illustrating an offline scanning process provided for some embodiments of this application;

[0089] Figure 9 A schematic diagram of an online scanning process provided for some embodiments of this application;

[0090] Figure 10 This is a schematic diagram of the module structure of the data scanning device according to an embodiment of this application;

[0091] Figure 11 This is a schematic diagram of the device structure of the hardware operating environment involved in the data scanning method in the embodiments of this application.

[0092] The purpose, features, and advantages of this application will be further explained in conjunction with the embodiments and with reference to the accompanying drawings. Detailed Implementation

[0093] It should be understood that the specific embodiments described herein are merely illustrative of the technical solutions of this application and are not intended to limit this application.

[0094] To better understand the technical solution of this application, a detailed description will be provided below in conjunction with the accompanying drawings and specific implementation methods.

[0095] Figure 1 This is a schematic diagram illustrating an implementation environment provided by an embodiment of this disclosure. See also... Figure 1 The implementation environment includes a terminal 101 and a server 102. The terminal 101 and the server 102 are connected via a wireless or wired network. For example, the terminal 101 is installed with a target application provided by the server 102, and the terminal 101 can perform functions such as data transmission and message interaction through the target application.

[0096] For example, terminal 101 can be a computer, mobile phone, tablet computer, or other terminal. For example, the target application can be a target application in the operating system of terminal 101, or a target application provided by a third party. For example, the target application can be a data analysis application, a search application, etc. For example, server 102 can be a backend server corresponding to the target application. Accordingly, server 102 can be a data analysis application server, a search application server, etc.

[0097] In this application, terminal 101 is used to send a data scanning instruction to server 102. Server 102 is used to receive the data scanning instruction. In response to the data scanning instruction, it extracts the data matching rules corresponding to the target sample data from the data scanning instruction. Based on the data matching rules, it performs a data scanning task, that is, scans the database to determine the target sample data that conforms to the data matching rules, wherein the database is used to store sample data. If the current scan result satisfies the scanning target, the data scanning task is stopped, and the scan result contains at least one target sample data that conforms to the data matching rules obtained in the current scan. The at least one target sample data is determined as the target scan result corresponding to the data scanning instruction. Server 102 is also used to send the target scan result to terminal 101. After receiving the target scan result, terminal 101 displays the target scan result.

[0098] Alternatively, the data scanning process described above can be completed by terminal 101 alone. Alternatively, terminal 101 can complete the process through the installed target application. This application embodiment does not impose any limitations on this.

[0099] The data scanning method provided in this application is applicable to various scenarios. Optionally, it can be used for data quality checks. For example, data in a database that needs quality checks can be used as target sample data, and data matching rules corresponding to the target sample data can be set. Using the method provided in this application, target scanning results are obtained, i.e., at least one target sample data that needs quality checks. Then, quality checks can be performed on these target sample data. For example, checking for errors, duplicates, missing values, inconsistencies, and other problems in the target sample data. Optionally, this data scanning method is also applicable to scenarios involving data security and compliance checks. For example, in financial transaction data scanning, suspicious transaction records, such as frequently traded records with abnormal amounts, can be used as target sample data, and data matching rules corresponding to the target sample data can be set. Then, using the method provided in this application, target scanning results are obtained, i.e., suspicious transaction records. Then, security and compliance checks can be performed on these data.

[0100] Figure 2 This is a flowchart illustrating the first embodiment of the data scanning method of this application. (Refer to...) Figure 2 Taking the server as the executing entity as an example, this data scanning method includes the following steps S10 to S40:

[0101] Step S10: In response to the data scanning command, extract the data matching rules corresponding to the target sample data from the data scanning command.

[0102] A data scan command is a command sent from the user terminal to the server to initiate a data scan operation. This command contains key information required to perform the data scan task, such as specifying the data range to be scanned and the data matching rules, and is the starting point for triggering the entire data scan process.

[0103] For example, a user accesses a data scanning interface through a user terminal, which includes a rule input box. The user enters a data matching rule in the box, and the user terminal generates a data scanning instruction based on the rule and sends the instruction to the server.

[0104] Target sample data refers to sample data that meets specific criteria that the user expects to retrieve from the database. This data is the object that the data scanning task ultimately seeks to find and identify.

[0105] Data matching rules are standards extracted from data scanning instructions and used to filter target sample data in a database. They define what kind of sample data meets the requirements, such as specific field values, data formats, and ranges. For example, "age greater than 30 years old and purchase amount greater than 1000 yuan" could be a data matching rule.

[0106] Step S20: Perform a data scanning task based on data matching rules. The data scanning task refers to scanning the database to identify target sample data that meets the data matching rules. The database is used to store sample data.

[0107] A data scanning task is a process of performing a full or partial scan of a database storing sample data based on extracted data matching rules. The goal of this task is to identify all target sample data in the database that matches the data matching rules.

[0108] A database is a collection used to store sample data. It can be of various types, such as relational databases and non-relational databases. Databases provide a data source for data scanning.

[0109] Sample data are the basic data units that make up the content of a database. These data can be of various types and formats, such as text, images, audio, video, numbers, dates, installation packages, software, etc. They are the objects of data scanning operations.

[0110] Optionally, the server performs full database filtering. That is, it checks and filters all sample data in the database one by one according to the data matching rules to obtain target sample data that meets the data matching rules.

[0111] Optionally, the database includes multiple data storage areas, which are used to store sample data of corresponding data types. In addition to data matching rules, in response to a data scanning command, the server also extracts the target type to which the target sample data belongs. Accordingly, the server performs a data scanning task based on the data matching rules, including: the server determining the target storage area corresponding to the target type in the database; and scanning the target storage area to identify target sample data that conforms to the data matching rules.

[0112] Data storage areas are components of a database, with each area specifically designed to store sample data of a corresponding data type. This division facilitates the categorization, management, and efficient storage of different data types. The target storage area is the data storage area in the database that corresponds to the target data type. Once the target type is determined, the server can locate this specific area and perform a targeted data scan to find target sample data that matches the data matching rules.

[0113] The correspondence between data types and data storage areas is predefined. For example, data types include text, images, audio, video, installation packages, software, and many others. Each data type corresponds to a different data storage area. The target type is the data type to which the target sample data belongs. By specifying the target type, the server can determine which data storage area in the database should be scanned, thereby narrowing down the scanning scope.

[0114] In this embodiment, by extracting the target type from the data scanning command, the server can directly locate the target storage area without performing a full database scan. This significantly reduces the amount of data to be processed, shortens the scanning time, and improves the efficiency of data scanning. Furthermore, accurate target storage area location means the server does not need to process large amounts of irrelevant data, reducing server resource consumption during the data scanning process.

[0115] Step S30: If the current scan result meets the scan target, stop executing the data scanning task. The scan result contains at least one target sample data that meets the data matching rules obtained from the current scan.

[0116] The scan result is the set of target sample data that conforms to the data matching rules obtained at the current stage during the data scanning task. This set contains at least one target sample data, and the set may continue to grow as the scan progresses.

[0117] A scanning objective is a standard used to determine whether a data scanning task is complete. When the scan results meet this standard, the data scanning task is considered to have achieved its intended purpose and execution can stop. For example, a scanning objective may be related to the quantity of sample data. For instance, the scanning objective could be finding 100 target sample data points that match the data matching rules, or finding any single target sample data point that matches the data matching rules. For example, a scanning objective may be related to the quality of the sample data. For instance, the scanning objective may be that the currently found target sample data that matches the data matching rules meets the user's needs. For example, if the currently scanned target sample data is provided to the user, and the user expresses their approval of the currently found target sample data in any way, then the currently found target sample data is considered to meet the user's needs, thus determining that the current scan result meets the scanning objective.

[0118] Step S40: Determine at least one target sample data as the target scan result corresponding to the data scan command.

[0119] The target scan result is the final target sample data that meets the requirements of the data scan instruction after the data scan task is executed. This data is the output of the entire data scan process and will be used for subsequent analysis, processing, or display operations.

[0120] For example, after the server identifies at least one target sample data as the target scan result corresponding to the data scan command, it sends the target scan result to the user terminal. After receiving the target scan result, the user terminal displays the target scan result.

[0121] The data scanning scheme provided in this application includes an interruption mechanism for the data scanning task. Specifically, in response to a data scanning command, the data matching rules corresponding to the target sample data are extracted from the command. The data scanning task is then executed based on these matching rules, i.e., scanning the database storing the sample data to identify target sample data that matches the matching rules. To improve the execution efficiency and reduce task time, this application's scheme does not wait for the entire database scan to complete before ending the data scanning task. Instead, a scanning target is set, and the data scanning task stops when the current scan result meets the target. The current scan result includes at least one target sample data that matches the matching rules. This at least one target sample data is then identified as the target scan result corresponding to the data scanning command. This not only completes the data scanning task earlier, reducing task time and allowing users to obtain the target scan results promptly, but also saves scanning resources.

[0122] Based on the first embodiment described above, a second embodiment of this application is proposed. Contents that are the same as or similar to the first embodiment can be referred to the above description and will not be repeated hereafter. (Refer to...) Figure 3In the second embodiment, step S30 includes steps S301 to S302:

[0123] Step S301: Determine the number of target sample data that meet the data matching rules obtained from the current scan.

[0124] The quantity of target sample data is a quantitative representation of the size of the target sample data. By counting this quantity, we can intuitively understand the scale of the current scan results.

[0125] Step S302: If the number of target sample data obtained by scanning reaches the target number, stop executing the data scanning task.

[0126] The target number is the number of target sample data points that are expected to be obtained that meet the data matching rules, set before the data scanning task begins. It is one of the important criteria for determining whether to stop the data scanning task, clarifying a specific quantitative indicator that the data scanning task needs to achieve. For example, setting the target number to 100 means that 100 target sample data points that meet the data matching rules should be obtained.

[0127] For example, a user accesses a data scanning interface through a user terminal. This interface includes not only a rule input box but also a quantity input box. The user enters a data matching rule in the rule input box and a target quantity in the quantity input box. The user terminal then generates a data scanning instruction based on the data matching rule and the target quantity and sends this instruction to the server. Correspondingly, in response to the data scanning instruction, the server also extracts the target quantity from the instruction. For example, if the user does not input a target quantity, the server retrieves a default target quantity.

[0128] In this embodiment, a target number is set, and the data scanning task stops once the number of target sample data obtained by scanning reaches the target number. This avoids meaningless traversal of the data source and reduces unnecessary computational resources and time consumption. For example, when processing massive amounts of user behavior data, if only 1000 sample data entries that match the data matching rules need to be obtained, scanning can stop after the 1000th matching sample data entry is scanned, which can greatly shorten the time consumed by the scanning task and improve the execution efficiency of the scanning task. Furthermore, since the server does not need to continue processing redundant data, it can also save server resources during the execution of the data scanning task, including CPU utilization, memory usage, and network bandwidth.

[0129] Optionally, determining whether to stop the data scanning task depends not only on the number of target sample data obtained but also on the execution time of the scanning task. Accordingly, the server stops executing the data scanning task when the number of target sample data obtained reaches the target number, including: the server determining the execution time of the data scanning task; and stopping the data scanning task when the number of target sample data obtained reaches the target number and the execution time exceeds the target duration.

[0130] Execution time refers to the elapsed time from the start of a data scanning task to the current moment. By recording and monitoring execution time, we can understand the progress of the data scanning task and evaluate its efficiency.

[0131] The target duration is the maximum time allowed for a data scanning task to execute, set before the task begins. It is another crucial factor in determining whether to stop the data scanning task, controlling its execution time to prevent excessive resource consumption or long waiting times for user results, thus negatively impacting user experience.

[0132] In this embodiment, not only is the quantity of target sample data acquired considered, but the execution time is also incorporated into the decision-making condition for stopping the task, making the stopping conditions for the data scanning task more flexible and comprehensive. For example, if the quantity of target sample data acquired reaches the target quantity, and the task execution time exceeds the target time, the task is stopped promptly to meet real-time requirements. Conversely, if the quantity of target sample data acquired reaches the target quantity, but the task execution time has not exceeded the target time, as much target sample data as possible can be acquired to meet data integrity requirements. This comprehensive consideration of both the target quantity and target time allows for better provision of data scanning services that better meet users' actual needs.

[0133] Based on the first embodiment described above, a third embodiment of this application is proposed. Contents that are the same as or similar to the first embodiment can be referred to the above description and will not be repeated hereafter. (Refer to...) Figure 4 In the third embodiment, step S30 includes steps S303 to S304:

[0134] Step S303: Send the current scan results to the user terminal so that the user terminal can display the current scan results and the task interruption control. The user terminal is the terminal that sent the data scan command.

[0135] The current scan result is the set of target sample data that meets the requirements and has been selected from the database by the server according to the data matching rules up to the current moment during the data scanning task.

[0136] A task interruption control is a visual element on the user terminal interface, such as a button or icon. Users can trigger this control, for example by clicking it, to send a task interruption command to the server and stop the ongoing data scanning task.

[0137] For example, the user terminal displays the current scan results by showing the name of at least one target sample data obtained from the current scan. In addition, the user terminal may also display the data matching rules corresponding to the target sample data.

[0138] Optionally, the server sends the current scan results to the user terminal so that the user terminal can display the current scan results and a task interruption control, including: the server caching the current scan results in real time; and in response to a task progress viewing command from the user terminal, sending task progress information to the user terminal, the task progress information including the cached scan results and the number of target sample data contained in the scan results, so that the user terminal can display the task progress information and a task interruption control.

[0139] Real-time caching of current scan results means that the server temporarily stores the current scan results in memory or high-speed storage devices to quickly respond to subsequent requests. Real-time caching can improve data access speed and reduce data transmission and processing time.

[0140] A task progress view command is a command initiated by a user on their terminal to request to view the current progress of a data scanning task. By sending this command, the user can obtain task progress information about the scanning task.

[0141] Task progress information is sent from the server to the user terminal after receiving a task progress viewing command. This information includes the current status of the scanning task, the cached scan results, and the number of target sample data points contained within those results, helping the user understand the progress of the scanning task.

[0142] In this embodiment, the server caches the scan results in real time, enabling it to quickly respond to user requests to view task progress. Therefore, users can send task progress viewing commands to understand the progress of the data scanning task at any time, including the number of target sample data acquired and the specific scan results. This allows users to better grasp the task status, make decisions based on the actual situation, enhance user control over the task, and improve the user experience. Furthermore, a task interruption control is provided, allowing users to directly send a task interruption command to the server to stop the data scanning task promptly if they believe the current scan results meet their needs or want to stop the task for other reasons after understanding the task progress. This flexibility avoids unnecessary waiting time for users and improves task execution efficiency.

[0143] Step S304: In response to a task interruption command from the user terminal, stop executing the data scanning task. The task interruption command is sent by the user terminal when it detects a trigger operation on the task interruption control.

[0144] A task interruption command is a command sent by the user terminal to the server to stop the data scanning task after detecting a trigger operation on the task interruption control. Upon receiving the command, the server will stop the currently ongoing data scanning operation.

[0145] In this embodiment, users are allowed to decide whether to stop the data scanning task based on the real-time scan results, greatly enhancing the interactivity between the user and the server. Users are no longer passively waiting for the task to complete, but can flexibly control the task's execution progress according to actual needs and their judgment of the scan results. For example, when a user checks the current scan results and finds that enough data has been obtained to meet their needs, they can stop the task in time, saving waiting time. By providing the task interruption function, the data scanning task is prevented from unnecessarily consuming system resources and time even after the user has obtained the required data. This helps reduce unnecessary scanning resources, such as computing resources, network resources, and time resources.

[0146] Based on the first embodiment of this application described above, a fourth embodiment of this application is proposed. Contents that are the same as or similar to the first embodiment can be referred to the above description and will not be repeated hereafter. See also... Figure 5 In the fourth embodiment, step S20 includes steps S201 and S202, and step S30 is further refined into step S305.

[0147] Step S201: Extract sample screening conditions from the data scanning instructions using the data screening component, and select multiple sample data that meet the sample screening conditions from the database based on the sample screening conditions.

[0148] The data filtering component is a functional module responsible for extracting sample filtering conditions from the data scanning instructions and initially filtering multiple sample data from the database based on these conditions. It plays a role in initially filtering the raw data, narrowing down the scope of subsequent data scanning.

[0149] Sample filtering conditions are extracted from data scanning instructions and used for preliminary screening of sample data in the database. These conditions can be simple attribute value matching or complex logical combinations. Using these conditions, data that does not meet basic requirements can be quickly eliminated, improving data processing efficiency. For example, a user accesses a data scanning interface through a user terminal. This interface includes not only rule input boxes but also filter condition input boxes. The user enters data matching rules in the rule input box and sample filtering conditions in the filter condition input box. The user terminal then generates a data scanning instruction based on the data matching rules and sample filtering conditions and sends the instruction to the server.

[0150] The sample data is a batch of data initially filtered from the database by the data filtering component based on sample filtering criteria. This data is the object of further processing by the subsequent data scanning component and may not completely conform to the final data matching rules.

[0151] Step S202: Using the data scanning component, the multiple sample data are scanned based on the data matching rules to determine the target sample data that meets the data matching rules.

[0152] The data scanning component is a functional module responsible for performing in-depth scanning and judgment on multiple initially screened sample data according to data matching rules to determine the target sample data that meets the data matching rules. It is the core execution unit of the data scanning task and determines the accuracy of the final target sample data.

[0153] The target sample data consists of sample data that meets all requirements, determined by the data scanning component after scanning multiple sample data based on data matching rules. This data is the final output of the data scanning task and will be used for subsequent analysis, processing, or display operations.

[0154] In this embodiment, by employing a collaborative approach between a data filtering component and a data scanning component, the data in the database is first preliminarily filtered, and then a deeper scan is performed based on data matching rules. This step-by-step processing method can more accurately filter out target sample data that meets the requirements from a large amount of data. Preliminary filtering can eliminate data that obviously does not meet the conditions, reducing the workload of subsequent data scanning and improving the accuracy of the final results. The use of the data filtering component allows for a rapid narrowing of the data processing scope before data scanning. Deep scanning is performed only on a few sample data points after preliminary filtering, rather than a full scan of the entire database, which greatly reduces data processing time and resource consumption, improving the execution efficiency of the data scanning task.

[0155] The data scanning instructions in this application include both online and offline scanning instructions. The online and offline scanning instructions scan different data sources. Optionally, the data scanning instruction is an offline scanning instruction. Accordingly, the data scanning task is performed based on data matching rules, including: scanning the entire database to determine target sample data that conforms to the data matching rules; the entire database stores all sample data from historical moments to the current moment.

[0156] Offline scan commands are a specific type of data scan command. In contrast to online scan commands, offline scans typically do not interact closely with real-time business processes. They allow for comprehensive and in-depth scanning of large amounts of data without directly interfering with running real-time business operations, thus ensuring normal business operation.

[0157] A full database is a database used to store all sample data from a historical point in time to the present. It contains all relevant historical data, providing a complete data foundation for comprehensive and in-depth data analysis and processing.

[0158] In this embodiment, since the full database stores a wealth of historical data, scanning the full database when the data scanning command is an offline scanning command helps to conduct comprehensive data analysis, avoid missing important information, and provide support for more accurate decision-making.

[0159] Optionally, the data scanning instruction is an online scanning instruction. Accordingly, the data scanning task is performed based on data matching rules, including: scanning an incremental database to identify target sample data that conforms to the data matching rules, the incremental database being used to store newly generated sample data since historical moments; and / or scanning based on Elasticsearch (ES) to identify target sample data that conforms to the data matching rules, ES being used to store partial sample data extracted from the full database.

[0160] Online scan commands are a specific type of data scan command, as opposed to offline scan commands. Online scan commands are used to trigger immediate data scan operations and have high real-time requirements. During business operations, data scan tasks can be initiated at any time as needed using online scan commands to obtain the latest data information.

[0161] An incremental database is used to store newly generated sample data since a historical point in time. It only contains data added after a specific point in time. Compared to the full database, the incremental database is relatively small in size and updates data more frequently. By scanning the incremental database, the latest data changes can be quickly obtained, saving time and resources compared to scanning the full database.

[0162] Elasticsearch (ES) is a distributed, highly scalable, and real-time open-source search engine based on Lucene (an open-source full-text search engine toolkit). It provides powerful search capabilities, enabling rapid retrieval and matching of stored data, and supports complex query conditions and data analysis operations. In this solution, ES is used to store a subset of sample data extracted from the full database. Therefore, data scanning based on ES not only avoids frequent processing of the full dataset, improving resource utilization, but also enhances the efficiency of data filtering.

[0163] For online scanning commands, this application provides two different data scanning methods: incremental database scanning and ES-based scanning. Users can choose the appropriate method according to their actual needs, or use both methods simultaneously to meet the data acquisition needs in different scenarios, thus increasing the flexibility and applicability of the solution.

[0164] In this embodiment, by responding to online scanning commands and scanning the incremental database, newly generated data changes can be quickly captured, enabling the system to respond promptly to the latest business needs and provide real-time data analysis and decision support. Furthermore, scanning the incremental database, rather than performing a large-scale scan of the entire database, significantly reduces data processing volume and scanning time, improving data scanning efficiency. Simultaneously, leveraging Elasticsearch's powerful search capabilities, multiple sample data points that meet the sample selection criteria can be quickly located and filtered, further improving data processing efficiency.

[0165] Step S305: If the current scanning result meets the scanning target, the data scanning component sends an interrupt signal to the data filtering component to stop filtering sample data.

[0166] This application embodiment achieves the interruption of the scanning task through the interaction between the data scanning component and the data filtering component. The data filtering component stops filtering sample data in response to an interrupt signal from the data scanning component. The interrupt signal is a specific signal sent by the data scanning component to the data filtering component when the scanning results meet the scanning target. Its function is to notify the data filtering component to stop the currently ongoing operation of filtering sample data.

[0167] For example, when the data scanning command is an online scanning command, if the data filtering component performs data filtering on the incremental database while also performing data filtering based on Elasticsearch (ES), the data scanning component only determines the number of target sample data obtained based on ES. If the number of target sample data obtained based on ES reaches the target number, it sends an interrupt signal to the data filtering component.

[0168] Accordingly, in response to an interruption signal, the data filtering component can stop filtering data based on Elasticsearch (ES) without stopping filtering data in the incremental database. Since the incremental database often contains the latest data changes closely related to business operations and may be constantly updating key metrics, continuous scanning ensures that business personnel have timely access to the latest information. This differentiated stopping mechanism avoids halting all filtering operations due to an interruption signal, thus guaranteeing continuous scanning and processing of important data sources and maintaining the real-time nature of data processing.

[0169] Of course, the data filtering component can also respond to the interrupt signal and stop all data filtering operations; this application embodiment does not limit this.

[0170] In this embodiment, the data filtering component and the data scanning component interact and send interrupt signals, reflecting a modular design philosophy. Each component has a clearly defined responsibility: the data filtering component is responsible for filtering data, the data scanning component is responsible for scanning data, and the transmission of interrupt signals is the collaborative mechanism between them to interrupt the scanning task. This clear modular division makes the code structure more intuitive and reduces development difficulty and maintenance costs.

[0171] Based on the fourth embodiment of this application described above, a fifth embodiment of this application is proposed. Contents that are the same as or similar to the fourth embodiment can be referred to the above description and will not be repeated hereafter. See also... Figure 6 In the fifth embodiment, step S201 is refined into step S2011, and step S202 is refined into step S2021.

[0172] Step S2011: Through the data filtering component, extract sample filtering conditions from the data scanning instruction, query sample data that meets the sample filtering conditions from the database, and add the sample identifiers of the queried sample data to the message queue in sequence.

[0173] Optionally, the data scanning instruction in this embodiment is an online scanning instruction. The online scanning instruction indicates that the data scanning task is in streaming scanning mode. Streaming scanning mode is a data scanning method in which data is processed continuously like a flowing stream. In this mode, data is acquired and scanned for analysis in a continuous stream, rather than processing a large amount of static data at once.

[0174] A sample identifier is an identifier used to uniquely identify sample data, similar to a national identity card number. It allows for easy location and retrieval of corresponding sample data from a database. For example, a sample identifier is a hash value obtained by hashing the sample data.

[0175] A message queue is a first-in, first-out (FIFO) data structure used to pass messages between different components. In this scheme, it receives sample identifiers added by the data filtering component and provides a sequence of sample identifiers to be processed by the data scanning component. For example, the message queue in this application is a Kafka message queue. Kafka is a high-throughput distributed publish-subscribe messaging system. It provides reliable asynchronous communication between different modules in the form of a message queue.

[0176] Step S2021: The data scanning component sequentially retrieves sample identifiers from the message queue, retrieves sample data corresponding to the sample identifiers from the database, scans the retrieved sample data, and determines the retrieved sample data as target sample data if the retrieved sample data meets the data matching rules.

[0177] For example, in streaming processing, the data filtering and data scanning components are designed based on a streaming processing framework, such as Apache Filter. Apache Filter is a distributed, open-source platform that integrates streaming and batch processing and is widely used for real-time processing of large-scale data. It features high performance, high throughput, and low latency, and can handle unlimited data streams. In this application, the data filtering and data scanning components are designed based on Apache Filter, which can fully utilize the features of Apache Filter to achieve efficient, real-time, and reliable data filtering and scanning functions.

[0178] For example, the database includes an information repository and a content repository. The information repository stores metadata about the sample data, such as the sample identifier, type, size, and storage time. The content repository stores the actual content of the sample data. Accordingly, the data filtering component selects multiple sample data points that meet the filtering criteria from the information repository and places their sample identifiers into a message queue. The data scanning component downloads the corresponding sample data from the content repository based on the sample identifiers in the message queue and then scans the sample data.

[0179] In this embodiment, the data filtering component and the data scanning component work collaboratively. The data filtering component first performs preliminary filtering of the sample data, placing the sample identifiers of the filtered sample data into a message queue. The data scanning component then sequentially retrieves the sample identifiers from the message queue and then retrieves the corresponding sample data from the database for scanning. This streaming scanning mode enables real-time data processing and timely response to business needs. In scenarios where data is continuously generated, new data can be continuously filtered and scanned to ensure that the latest and most compliant data is quickly obtained.

[0180] Based on the fourth embodiment of this application described above, a sixth embodiment of this application is proposed. Contents that are the same as or similar to the fourth embodiment can be referred to the above description and will not be repeated hereafter. See also... Figure 7 In the sixth embodiment, step S201 is refined into step S2012, and step S202 is refined into step S2022.

[0181] In step S2012, the sample screening conditions are extracted from the data scanning instructions through the data screening component, sample data that meets the sample screening conditions are queried from the database, and the sample identifiers of the queried sample data are placed in the cache in batches.

[0182] Optionally, the data scanning instruction in this embodiment is an offline scanning instruction. The offline scanning instruction indicates that the data scanning task is in batch scanning mode. Batch scanning mode is a data scanning method that processes data in batches, rather than processing data row by row or data one by one. This mode is suitable for processing large amounts of data, improving processing efficiency and reducing frequent calls to system resources.

[0183] A cache is a high-speed data storage area used to temporarily store data. In this solution, the cache is used to temporarily store sample identifiers so that the data scanning component can acquire them in batches and perform subsequent processing, reducing the number of direct database accesses and improving processing efficiency.

[0184] Step S2022: The data scanning component retrieves sample identifiers in batches from the cache and retrieves sample data corresponding to the sample identifiers in batches from the database. The retrieved sample data is scanned, and if the retrieved sample data meets the data matching rules, the retrieved sample data is determined as the target sample data.

[0185] For example, in batch processing mode, the data filtering and data scanning components are designed based on a batch processing framework, such as MapReduce. MapReduce is a distributed computing framework for large-scale data processing with powerful distributed processing capabilities. It can decompose large-scale data processing tasks into multiple smaller tasks, which are distributed across multiple nodes in a cluster for parallel processing, greatly improving processing efficiency and meeting the needs of processing massive amounts of data. Designing data filtering and data scanning components based on the MapReduce framework in batch processing mode can fully leverage the advantages of MapReduce to achieve an efficient, reliable, and easy-to-maintain data processing workflow, meeting the needs of large-scale data processing.

[0186] For example, the database includes an information repository and a content repository. The information repository stores metadata about the sample data, such as the sample identifier, type, size, and storage time. The content repository stores the actual content of the sample data. Accordingly, the data filtering component selects multiple sample data points that meet the filtering criteria from the information repository and caches their sample identifiers. The data scanning component downloads the corresponding sample data from the content repository based on the cached sample identifiers and then scans the sample data.

[0187] In this embodiment, in batch scanning mode, both the data filtering component and the data scanning component employ batch operations. Batch querying of data from the database, batch storage of sample identifiers, and batch retrieval of sample data reduce the number of database accesses, lower system overhead, and thus significantly improve data processing efficiency. Furthermore, since cache read / write speeds are typically faster than database speeds, storing sample identifiers in batches in the cache and having the data scanning component retrieve data from the cache in batches helps alleviate the database load, further improving data processing efficiency.

[0188] Figure 8 This is a schematic diagram of an offline scanning process provided in some embodiments of this application. (Reference) Figure 8First, the user enters data matching rules, and the user terminal sends a data scanning command containing those rules to the server. The server responds to the data scanning command by selecting samples. Accessing a specified sample set means, if the data scanning command includes the target type of the target sample data, determining the target storage area corresponding to that target type in the database, and filtering the sample data in that target storage area using a data filtering component. Accessing the entire sample set means, if the data scanning command does not include the target type of the target sample data, filtering the sample data in the entire database using a data filtering component. Next, the data scanning component downloads and scans samples based on the sample identifiers of the sample data filtered by the sample filtering component. Then, it counts the number of samples, that is, the number of target sample data that match the data matching rules. It then determines whether this number has reached the target number. If it has not reached the target number, the sample download and scanning continues. If it has reached the target number, the scanning task is interrupted.

[0189] Figure 9 This is a schematic diagram of an online scanning process provided in some embodiments of this application. (Reference) Figure 9 First, the user enters data matching rules, and the user terminal sends a data scanning command containing those rules to the server. The server responds to this command by selecting samples. Incremental sample access refers to filtering sample data in the incremental database using a data filtering component. ES sample export refers to filtering sample data based on Elasticsearch using the data filtering component. Then, the data filtering component places the sample identifiers of the selected sample data into a message queue. Next, the data scanning component retrieves the sample identifiers from the message queue and performs sample download scanning. Then, the number of samples is counted, that is, the number of target sample data that match the data matching rules is counted. It is then determined whether this number has reached the target number. If it has not reached the target number, sample download scanning continues. If the target number has been reached, the scanning task is interrupted.

[0190] Another point to note is that the above examples are only for understanding this application and do not constitute a limitation on the data scanning method of this application. Any simple modifications based on this technical concept are within the protection scope of this application.

[0191] This application also provides a data scanning device, please refer to... Figure 10 The data scanning device includes:

[0192] Command response module 10 is used to extract the data matching rules corresponding to the target sample data from the data scanning command in response to the data scanning command;

[0193] Task execution module 20 is used to execute data scanning tasks based on data matching rules. The data scanning task refers to scanning the database to identify target sample data that meets the data matching rules. The database is used to store sample data.

[0194] The task interruption module 30 is used to stop the execution of the data scanning task when the current scan result meets the scanning target. The scan result contains at least one target sample data that meets the data matching rules obtained by the current scan.

[0195] The result determination module 40 is used to determine at least one target sample data as the target scan result corresponding to the data scan command.

[0196] Optionally, the task interruption module 30 includes:

[0197] The quantity determination unit is used to determine the number of target sample data that meet the data matching rules obtained in the current scan.

[0198] The first interrupt unit is used to stop the data scanning task when the number of target sample data obtained by scanning reaches the target number.

[0199] Optionally, the first interrupt unit is used to determine the execution time of the data scanning task; if the number of target sample data obtained by scanning reaches the target number and the execution time exceeds the target time, the data scanning task is stopped.

[0200] Optionally, the task interruption module 30 includes:

[0201] The result sending unit is used to send the current scan results to the user terminal so that the user terminal can display the current scan results and the task interruption control. The user terminal is the terminal that sends the data scanning command.

[0202] The second interrupt unit is used to stop executing the data scanning task in response to a task interrupt command from the user terminal. The task interrupt command is sent by the user terminal when it detects a trigger operation on the task interrupt control.

[0203] Optionally, the result sending unit is used to cache the current scan results in real time; in response to a task progress viewing command from the user terminal, it sends task progress information to the user terminal, the task progress information including the cached scan results and the number of target sample data contained in the scan results, so that the user terminal can display the task progress information and the task interruption control.

[0204] Optionally, the database includes multiple data storage areas, which are used to store sample data of corresponding data types;

[0205] The instruction response module 10 is also used to extract the target type of the target sample data from the data scanning instruction in response to the data scanning instruction;

[0206] The task execution module 20 is used to determine the target storage area corresponding to the target type in the database; and to perform data scanning on the target storage area to identify target sample data that meets the data matching rules.

[0207] Optionally, the task execution module 20 includes:

[0208] The sample screening unit is used to extract sample screening conditions from the data scanning instructions through the data screening component, and to screen out multiple sample data that meet the sample screening conditions from the database based on the sample screening conditions.

[0209] The data scanning unit is used to scan multiple sample data based on data matching rules through the data scanning component in order to identify the target sample data that meets the data matching rules.

[0210] Optionally, the data scanning instruction is an online scanning instruction, which indicates that the scanning mode of the data scanning task is streaming scanning mode;

[0211] The sample filtering unit is used to extract sample filtering conditions from the data scanning instructions through the data filtering component, query sample data that meets the sample filtering conditions from the database, and add the sample identifiers of the queried sample data to the message queue in sequence.

[0212] The data scanning unit is used to sequentially obtain sample identifiers from the message queue and sample data corresponding to the sample identifiers from the database through the data scanning component. The obtained sample data is then scanned, and if the obtained sample data meets the data matching rules, the obtained sample data is determined as the target sample data.

[0213] Optionally, the data scanning instruction is an offline scanning instruction, which indicates that the scanning mode of the data scanning task is batch scanning mode; the data scanning task is executed based on data matching rules, including:

[0214] The sample screening unit is used to extract sample screening conditions from the data scanning instructions through the data screening component, query sample data that meets the sample screening conditions from the database, and put the sample identifiers of the queried sample data into the cache in batches.

[0215] The data scanning unit is used to retrieve sample identifiers in batches from the cache and sample data corresponding to the sample identifiers in batches from the database through the data scanning component. The retrieved sample data is scanned, and if the retrieved sample data meets the data matching rules, the retrieved sample data is determined as the target sample data.

[0216] Optionally, the task interruption module 30 is used to send an interrupt signal to the data filtering component through the data scanning component when the current scanning result meets the scanning target, so as to make the data filtering component stop filtering sample data.

[0217] Optionally, the data scanning command is an offline scanning command;

[0218] The task execution module 20 is used to scan the full database to identify target sample data that meets the data matching rules. The full database is used to store all sample data from historical moments to the current moment.

[0219] Optionally, the data scanning command is an online scanning command;

[0220] The task execution module 20 is used to scan the incremental database to identify target sample data that meets the data matching rules. The incremental database is used to store newly generated sample data since the historical time. And / or, it scans the data based on the search engine ES to identify target sample data that meets the data matching rules. ES is used to store a portion of the sample data extracted from the full database. The full database is used to store all sample data from the historical time to the current time.

[0221] The data scanning device provided in this application, employing the data scanning method described in the above embodiments, can solve the technical problem in related technologies where data scanning tasks suffer from excessive time consumption and low execution efficiency due to too many hit results. Compared with the prior art, the beneficial effects of the data scanning device provided in this application are the same as those of the data scanning method provided in the above embodiments, and other technical features in the data scanning device are the same as those disclosed in the methods of the above embodiments, and will not be repeated here.

[0222] This application provides a data scanning device, which includes: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, which are executed by the at least one processor to enable the at least one processor to perform the data scanning method in Embodiment 1 above.

[0223] The following is for reference. Figure 11The diagram illustrates a structural schematic of a data scanning device suitable for implementing embodiments of this application. The data scanning device in the embodiments of this application may include, but is not limited to, mobile terminals such as mobile phones, laptops, digital broadcast receivers, PDAs (Personal Digital Assistants), PADs (Portable Application Describing), PMPs (Portable Media Players), in-vehicle terminals (e.g., in-vehicle navigation terminals), and fixed terminals such as digital TVs and desktop computers. Figure 11 The data scanning device shown is merely an example and should not impose any limitations on the functionality and scope of use of the embodiments of this application.

[0224] like Figure 11 As shown, the data scanning device may include a processing unit 1001 (e.g., a central processing unit, a graphics processing unit, etc.), which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 1002 or a program loaded from a storage device 1003 into a random access memory (RAM) 1004. The RAM 1004 also stores various programs and data required for the operation of the data scanning device. The processing unit 1001, ROM 1002, and RAM 1004 are interconnected via a bus 1005. An input / output (I / O) interface 1006 is also connected to the bus. Typically, the following systems can be connected to I / O interface 1006: input devices 1007 including, for example, touchscreens, touchpads, keyboards, mice, image sensors, microphones, accelerometers, gyroscopes, etc.; output devices 1008 including, for example, liquid crystal displays (LCDs), speakers, vibrators, etc.; storage devices 1003 including, for example, magnetic tapes, hard disks, etc.; and communication devices 1009. Communication device 1009 allows the data scanning device to communicate wirelessly or wiredly with other devices to exchange data. Although a data scanning device with various systems is shown in the figure, it should be understood that it is not required to implement or possess all the systems shown. More or fewer systems may be implemented alternatively.

[0225] Specifically, according to the embodiments disclosed in this application, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments disclosed in this application include a computer program product comprising a computer program carried on a computer-readable medium, the computer program containing program code for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via a communication device, or installed from storage device 1003, or installed from ROM 1002. When the computer program is executed by processing device 1001, it performs the functions defined in the methods of the embodiments disclosed in this application.

[0226] The data scanning device provided in this application, employing the data scanning method described in the above embodiments, can solve the technical problem in related technologies where data scanning tasks suffer from excessive time consumption and low execution efficiency due to too many hit results. Compared with the prior art, the beneficial effects of the data scanning device provided in this application are the same as those of the data scanning method provided in the above embodiments, and other technical features of this data scanning device are the same as those disclosed in the previous embodiment method, and will not be repeated here.

[0227] It should be understood that the various parts disclosed in this application can be implemented using hardware, software, firmware, or a combination thereof. In the description of the above embodiments, specific features, structures, materials, or characteristics can be combined in any suitable manner in one or more embodiments or examples.

[0228] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.

[0229] This application provides a computer-readable storage medium having computer-readable program instructions (i.e., a computer program) stored thereon, the computer-readable program instructions being used to execute the data scanning method described in the above embodiments.

[0230] The computer-readable storage medium provided in this application may be, for example, a USB flash drive, but is not limited to, electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices, or any combination thereof. More specific examples of computer-readable storage media may include, but are not limited to: electrical connections having one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fibers, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof. In this embodiment, the computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, system, or device. The program code contained on the computer-readable storage medium may be transmitted using any suitable medium, including but not limited to: wires, optical cables, RF (radio frequency), etc., or any suitable combination thereof.

[0231] The aforementioned computer-readable storage medium may be included in the data scanning device; or it may exist independently and not be assembled into the data scanning device.

[0232] The aforementioned computer-readable storage medium carries one or more programs that, when executed by a data scanning device, cause the data scanning device to: respond to a data scanning instruction by extracting data matching rules corresponding to target sample data from the data scanning instruction; execute a data scanning task based on the data matching rules, wherein the data scanning task refers to scanning a database to determine target sample data that conforms to the data matching rules, and the database is used to store sample data; stop executing the data scanning task if the current scanning result satisfies the scanning target, wherein the scanning result includes at least one target sample data that conforms to the data matching rules obtained in the current scan; and determine the at least one target sample data as the target scanning result corresponding to the data scanning instruction.

[0233] Computer program code for performing the operations of this application can be written in one or more programming languages ​​or a combination thereof, including object-oriented programming languages ​​such as Java, Smallport, and C++, and conventional procedural programming languages ​​such as the "C" language or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving remote computers, the remote computer can be connected to the user's computer via any type of network—including a Local Area Network (LAN) or a Wide Area Network (WAN)—or can be connected to an external computer (e.g., via the Internet using an Internet service provider).

[0234] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of this application. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, can be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.

[0235] The modules described in the embodiments of this application can be implemented in software or hardware. The names of the modules do not necessarily limit the functionality of the unit itself.

[0236] The readable storage medium provided in this application is a computer-readable storage medium that stores computer-readable program instructions (i.e., a computer program) for executing the above-described data scanning method. This solves the technical problem in related technologies where data scanning tasks suffer from excessive time consumption and low execution efficiency due to too many hit results. Compared with the prior art, the beneficial effects of the computer-readable storage medium provided in this application are the same as those of the data scanning method provided in the above embodiments, and will not be repeated here.

[0237] This application also provides a computer program product, including a computer program that, when executed by a processor, implements the steps of the data scanning method described above.

[0238] The computer program product provided in this application can solve the technical problem in related technologies where data scanning tasks are time-consuming and have low execution efficiency due to too many hit results. Compared with the prior art, the beneficial effects of the computer program product provided in this application are the same as those of the data scanning method provided in the above embodiments, and will not be repeated here.

[0239] The above description is only a part of the embodiments of this application and does not limit the patent scope of this application. All equivalent structural transformations made under the technical concept of this application and using the contents of the specification and drawings of this application, or direct / indirect applications in other related technical fields, are included in the patent protection scope of this application.

Claims

1. A data scanning method, characterized in that, The method includes: In response to a data scanning command, extract the data matching rules corresponding to the target sample data from the data scanning command; A data scanning task is performed based on the data matching rules. The data scanning task refers to scanning the database to identify target sample data that conforms to the data matching rules. The database is used to store sample data. If the current scan results meet the scan target, stop executing the data scanning task. The scan results include at least one target sample data that conforms to the data matching rules obtained from the current scan. The at least one target sample data is determined as the target scan result corresponding to the data scan command.

2. The method as described in claim 1, characterized in that, The step of stopping the data scanning task when the current scan results meet the scanning target includes: Determine the number of target sample data that match the data matching rules obtained in the current scan; Once the number of target sample data obtained from the scan reaches the target number, the data scanning task is stopped.

3. The method as described in claim 2, characterized in that, The step of stopping the data scanning task when the number of target sample data obtained by scanning reaches the target number includes: Determine the execution duration of the data scanning task; If the number of target sample data obtained by scanning reaches the target number and the execution time exceeds the target time, the data scanning task shall be stopped.

4. The method as described in claim 1, characterized in that, The step of stopping the data scanning task when the current scan results meet the scanning target includes: The current scan results are sent to the user terminal so that the user terminal can display the current scan results and a task interruption control, wherein the user terminal is the terminal that sent the data scan command; In response to a task interruption command from the user terminal, the execution of the data scanning task is stopped. The task interruption command is sent by the user terminal upon detecting a trigger operation on the task interruption control.

5. The method as described in claim 4, characterized in that, Sending the current scan results to the user terminal so that the user terminal can display the current scan results and a task interruption control includes: The current scan results are cached in real time; In response to a task progress viewing command from the user terminal, task progress information is sent to the user terminal. The task progress information includes cached scan results and the number of target sample data contained in the scan results, so that the user terminal can display the task progress information and the task interruption control.

6. The method as described in claim 1, characterized in that, The database includes multiple data storage areas, which are used to store sample data of corresponding data types; the method further includes: In response to the data scanning command, the target type to which the target sample data belongs is extracted from the data scanning command; The process of performing a data scanning task based on the data matching rules includes: Determine the target storage area corresponding to the target type in the database; The target storage area is scanned to identify target sample data that matches the data matching rules.

7. A data scanning device, characterized in that, The device includes: The instruction response module is used to extract the data matching rules corresponding to the target sample data from the data scanning instruction in response to the data scanning instruction; The task execution module is used to execute a data scanning task based on the data matching rules. The data scanning task refers to scanning the database to determine the target sample data that conforms to the data matching rules. The database is used to store the sample data. The task interruption module is used to stop the execution of the data scanning task when the current scan result meets the scanning target. The scan result includes at least one target sample data that conforms to the data matching rule obtained in the current scan. The result determination module is used to determine the at least one target sample data as the target scan result corresponding to the data scanning instruction.

8. A data scanning device, characterized in that, The device includes: a memory, a processor, and a computer program stored in the memory and executable on the processor, the computer program being configured to implement the steps of the data scanning method as described in any one of claims 1 to 6.

9. A storage medium, characterized in that, The storage medium is a computer-readable storage medium, and a computer program is stored on the storage medium. When the computer program is executed by a processor, it implements the steps of the data scanning method as described in any one of claims 1 to 6.

10. A computer program product, characterized in that, The computer program product includes a computer program that, when executed by a processor, implements the steps of the data scanning method as described in any one of claims 1 to 6.