Object processing method and apparatus
By performing pre-verification and optimizing task configuration before database detection tasks, the problems of high false alarm rate and resource waste in database detection are solved, and efficient and flexible data detection is achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- ALIBABA (CHINA) CO LTD
- Filing Date
- 2023-03-28
- Publication Date
- 2026-07-21
AI Technical Summary
Existing technologies suffer from high false alarm rates, low detection efficiency, and excessive resource consumption when detecting data in databases. This is especially true when data in the database is not updated in a timely manner or is stored inconsistently, leading to detection task failures and resource waste.
By performing pre-verification before the detection task, the relevant parameters of the object to be detected and the task execution conditions are determined. The detection task is executed only when the conditions are met. Data is obtained by using target data acquisition statements for detection. The number of concurrent tasks is controlled and task priorities are configured to avoid false alarms and resource waste.
It reduces the false alarm rate of data detection, improves detection efficiency, ensures data quality and consistency, optimizes resource utilization, and meets the flexible detection needs of different business operations.
Smart Images

Figure CN116431650B_ABST
Abstract
Description
Technical Field
[0001] The embodiments in this specification relate to the field of computer technology, and in particular to object processing methods. Background Technology
[0002] With the rapid development of the internet, data applications have become increasingly diverse, and more and more applications and services are built upon data. Only by ensuring data quality can the normal operation of these applications and services be guaranteed. Data quality can be assessed from dimensions such as stability, consistency, timeliness, completeness, standardization, and accuracy. Data quality is the foundation for the validity and accuracy of data analysis conclusions. Data lacking quality cannot demonstrate business value, and conducting data analysis and formulating business strategies based on abnormal data can lead to business anomalies. Therefore, how to implement data quality detection to ensure data quality is an issue that cannot be ignored. Summary of the Invention
[0003] In view of the above, embodiments of this specification provide an object processing method. One or more embodiments of this specification also relate to an object processing apparatus, another object processing method, another object processing apparatus, an object processing system, a commodity data detection method, and a computing device, to address the technical deficiencies existing in the prior art.
[0004] According to a first aspect of the embodiments of this specification, an object processing method is provided, including:
[0005] Determine the first object to be detected corresponding to the first detection task;
[0006] If it is determined that the first object to be detected meets the task execution conditions of the first detection task, the relevant parameters of the first object to be detected are determined;
[0007] Based on the relevant parameters of the first object to be detected, determine the target data acquisition statement corresponding to the first object to be detected;
[0008] The target data acquisition statement is used to obtain the data corresponding to the first object to be detected, and the data corresponding to the first object to be detected is detected to obtain the data detection result.
[0009] According to a second aspect of the embodiments of this specification, an object processing apparatus is provided, comprising:
[0010] The first determining module is configured to determine the first object to be detected corresponding to the first detection task;
[0011] The second determining module is configured to determine the relevant parameters of the first object to be detected when it is determined that the first object to be detected meets the task execution conditions of the first detection task.
[0012] The third determining module is configured to determine the target data acquisition statement corresponding to the first object to be detected based on the relevant parameters of the first object to be detected.
[0013] The detection module is configured to use the target data acquisition statement to acquire the data corresponding to the first object to be detected, to detect the data corresponding to the first object to be detected, and to obtain the data detection result.
[0014] According to a third aspect of the embodiments of this specification, an object processing method is provided, applied to an end-side device, comprising:
[0015] If a touch operation is detected on the display interface and it is determined that the touch operation triggers a data detection request, the task configuration interface is displayed on the display interface.
[0016] Detect touch operations on the first control in the task configuration interface, determine the corresponding task configuration information, and generate at least one initial detection task, wherein the first control is any one of at least one control on the task configuration interface;
[0017] Receive the data detection results obtained based on the at least one initial detection task, and display the data detection results through the display interface.
[0018] According to a fourth aspect of the embodiments of this specification, an object processing apparatus is provided, applied to an end-side device, comprising:
[0019] The display module is configured to detect a touch operation on the display interface and, if it is determined that the touch operation triggers a data detection request, display the task configuration interface through the display interface.
[0020] The generation module is configured to detect touch operations on a first control in the task configuration interface, determine the corresponding task configuration information, and generate at least one initial detection task, wherein the first control is any one of at least one control on the task configuration interface;
[0021] The receiving module is configured to receive data detection results obtained based on the at least one initial detection task, and to display the data detection results through the display interface.
[0022] According to a fifth aspect of the embodiments of this specification, an object processing system is provided, including an object detection unit and a data storage unit, wherein...
[0023] The object detection unit is used to execute the above object processing method, and the data storage unit is used to store the object to be detected and the data corresponding to the object to be detected.
[0024] According to a sixth aspect of the embodiments of this specification, a product data detection method is provided, comprising:
[0025] Determine the first indicator to be detected corresponding to the first detection task, wherein the first indicator to be detected is the indicator to be detected for the target product;
[0026] If it is determined that the first indicator to be detected meets the task execution conditions of the first detection task, the relevant parameters of the first indicator to be detected are determined.
[0027] Based on the relevant parameters of the first indicator to be detected, determine the target data acquisition statement corresponding to the first indicator to be detected;
[0028] The target data acquisition statement is used to obtain the data corresponding to the first indicator to be detected, and the data corresponding to the first indicator to be detected is detected to obtain the data detection result.
[0029] According to a seventh aspect of the embodiments of this specification, a computing device is provided, comprising:
[0030] Memory and processor;
[0031] The memory is used to store computer-executable instructions, and the processor is used to execute the computer-executable instructions, which, when executed by the processor, implement the steps of the above method.
[0032] According to an eighth aspect of the embodiments of this specification, a computer-readable storage medium is provided that stores computer-executable instructions that, when executed by a processor, implement the steps of the above-described method.
[0033] According to a ninth aspect of an embodiment of this specification, a computer program is provided, wherein when the computer program is executed in a computer, it causes the computer to perform the steps of the above-described method.
[0034] One embodiment of this specification provides an object processing method, which involves determining a first object to be detected corresponding to a first detection task; determining relevant parameters of the first object to be detected when the first object to be detected meets the task execution conditions of the first detection task; determining a target data acquisition statement corresponding to the first object to be detected based on the relevant parameters of the first object to be detected; acquiring data corresponding to the first object to be detected using the target data acquisition statement; detecting the data corresponding to the first object to be detected; and obtaining a data detection result.
[0035] The above method determines the detection task and verifies the object to be detected. If the object to be detected meets the task execution conditions, the relevant parameters of the object to be detected are determined, thereby determining the target data acquisition statement to obtain the data corresponding to the object to be detected. This facilitates data detection and avoids false alarms through pre-verification of the object to be detected, thereby improving detection efficiency. It also facilitates subsequent adjustment or alarm of abnormal data based on the data detection results, ensuring data quality. Attached Figure Description
[0036] Figure 1 This is a schematic diagram illustrating an application scenario of an object processing method provided in one embodiment of this specification;
[0037] Figure 2 This is a flowchart of an object processing method provided in one embodiment of this specification;
[0038] Figure 3 This is a flowchart illustrating the processing procedure of an object processing method provided in one embodiment of this specification.
[0039] Figure 4 This is a schematic diagram of the structure of an object processing device provided in one embodiment of this specification;
[0040] Figure 5 This is a flowchart of another object processing method provided in one embodiment of this specification;
[0041] Figure 6 This is a schematic diagram of a scenario illustrating an object processing method provided in one embodiment of this specification;
[0042] Figure 7 This is a schematic diagram of the structure of another object processing device provided in one embodiment of this specification;
[0043] Figure 8 This is a schematic diagram of the structure of an object processing system provided in one embodiment of this specification;
[0044] Figure 9 This is a framework diagram of another object processing system provided in one embodiment of this specification;
[0045] Figure 10 This is a structural block diagram of a computing device provided in one embodiment of this specification. Detailed Implementation
[0046] Many specific details are set forth in the following description to provide a full understanding of this specification. However, this specification can be implemented in many other ways than those described herein, and those skilled in the art can make similar extensions without departing from the spirit of this specification. Therefore, this specification is not limited to the specific implementations disclosed below.
[0047] The terminology used in one or more embodiments of this specification is for the purpose of describing particular embodiments only and is not intended to be limiting of the one or more embodiments of this specification. The singular forms “a,” “described,” and “the” as used in one or more embodiments of this specification and the appended claims are also intended to include the plural forms unless the context clearly indicates otherwise. It should also be understood that the term “and / or” as used in one or more embodiments of this specification refers to and includes any or all possible combinations of one or more associated listed items.
[0048] It should be understood that although the terms first, second, etc., may be used to describe various information in one or more embodiments of this specification, such information should not be limited to these terms. These terms are only used to distinguish information of the same type from one another. For example, first may also be referred to as second without departing from the scope of one or more embodiments of this specification, and similarly, second may also be referred to as first. Depending on the context, the word "if" as used herein may be interpreted as "when," "when," or "in response to a determination."
[0049] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, data stored, data displayed, etc.) involved in the embodiments of this specification are all information and data authorized by the user or fully authorized by all parties. Furthermore, the collection, use and processing of related data must comply with the relevant laws, regulations and standards of the relevant countries and regions, and corresponding operation entry points are provided for users to choose to authorize or refuse.
[0050] This specification provides an object processing method, and also relates to an object processing apparatus, another object processing method, another object processing apparatus, an object processing system, a commodity data detection method, and a computing device, which will be described in detail in the following embodiments.
[0051] In practical applications, to inspect data in a database, multiple SQL statements are typically submitted for testing. Specifically, SQL statements for data retrieval, data inspection, and result output are executed sequentially to obtain the final results. However, when inspecting multiple tables in a database, if data updates in the tables are not timely, resulting in partitions or tables not being generated or updated before SQL statements are executed, the corresponding data cannot be retrieved, leading to false positives with a high false positive rate.
[0052] Taking e-commerce as an example, companies typically store various product metrics in their internal databases, such as production volume and sales volume. This data reflects the smooth operation of the company's business processes, enabling analysis of the business situation. For instance, analyzing a product's sales volume over a period of time can provide data to determine strategies such as increasing production volume. Therefore, the quality of the data stored in the company's internal database must be guaranteed. The data must be accurate, and for dynamic data like product metrics that change daily, timely updates are essential. Thus, data in the database needs to be monitored. For example, monitoring rules can be determined based on the company's internal business needs. For instance, to ensure the normal operation of the business, the daily production volume of a product should be greater than zero to guarantee normal sales. Based on this, the daily production volume of products stored in the database can be monitored. If the daily production volume is confirmed to be greater than zero, it indicates that the daily production volume of that product meets business requirements. Alternatively, based on the company's internal business operations, if the sales curve of a certain product remains relatively flat over a period of time without declining, it indicates that the daily sales volume of that product should be greater than or equal to the previous day's daily sales volume. This aligns with the company's internal business operations. Therefore, the daily sales volume of the product stored in the database can be checked. If the daily sales volume is consistently greater than or equal to the previous day's, the data stored in the database is accurate. If the daily sales volume is found to be less than the previous day's, further processing can be performed based on the result to determine whether the data entry in the database is incorrect or if there has been a change in the company's business operations. Based on this, production and sales strategies can be further determined.
[0053] However, currently, when inspecting data in a database, such as inspecting the production volume data of a certain product, the inspection is usually carried out by submitting multiple SQL statements. For example, the SQL statement to retrieve the production volume data, the SQL statement to inspect the production volume data, and the SQL statement to output the inspection results can be executed sequentially. The inspection results are obtained based on the results of these SQL statements. This leads to a long time consumption for inspecting the production volume data of a product. When there are many products to be inspected or many inspection tasks, it will consume a lot of inspection resources and reduce inspection efficiency. Furthermore, when the production volume data for a certain product is updated in the database, issues such as system latency, the need to detect production volume data being stored in two separate tables, incomplete production volume data not being retrieved from one table, or other problems preventing the database from containing the updated production volume data, can lead to retrieval failure during production volume data detection. Since the database needs to be retrieved first for production volume data detection, the absence of updated data in the database results in a data retrieval failure, causing the detection of that production volume data to fail. This triggers an alert, but this alert is not due to a problem with the data detection result; rather, it's because the required data was not retrieved. This type of alert can generate false alarms, increasing the false alarm rate. Therefore, an effective technical solution is urgently needed to address these problems.
[0054] See Figure 1 , Figure 1 A schematic diagram illustrating an application scenario of an object processing method provided according to an embodiment of this specification is shown.
[0055] Figure 1 It includes a cloud-side device 102 and a database 104. The cloud-side device 102 can be used to execute object processing methods to detect the data stored in the database 104.
[0056] In specific implementation, when the cloud-side device 102 determines that the object to be detected stored in the database 104 has been updated, it determines at least one detection task corresponding to the object to be detected, and then determines the object to be detected corresponding to any one of the detection tasks. If it is determined that the object to be detected meets the task execution conditions of the detection task, the relevant parameters of the object to be detected are determined. Based on the relevant parameters, a target data acquisition statement is determined to obtain the data of the object to be detected. The target data acquisition statement is used to obtain the data of the object to be detected, and the data is verified to meet the detection rules corresponding to the detection task, thus obtaining the data detection result.
[0057] like Figure 1As shown, database 104 stores the number of visits (objects to be tested) of merchants on the e-commerce platform. Specifically, merchant A was visited 18 times on March 1st and 50 times on March 2nd, etc. Upon confirming an update in the number of visits, cloud device 102 determines that the corresponding detection task 1 is to check whether the daily number of visits is greater than 0. The detection rule for this task is: the daily number of visits for the merchant must be greater than 0. This detection rule can be pre-set according to the business needs of the e-commerce platform. Detection task 2 is to check whether the number of visits on the current day is greater than the number of visits on the previous day. The detection rule for this task is: the daily number of visits for the merchant must be greater than the number of visits on the previous day. For detection task 1, given that the number of visits on the updated day is stored in database 104, the relevant parameter corresponding to the number of visits is determined to be March 4th. Based on this parameter, target data retrieval statement 1 is determined to obtain the number of visits on March 4th. Using target data retrieval statement 1, the number of visits on March 4th is obtained from database 104 as 15 times. This number of visits meets the detection rule that the number of visits per day for merchants must be greater than 0. The data detection result can be considered as passing the detection. For detection task 2, assuming the number of visits on the day of the update and the number of visits on the previous day associated with the number of visits on the day of the update are stored in database 104, the relevant parameters for the number of visits on the day of the update are obtained as March 4th, and the relevant parameters for the number of visits on the previous day are obtained as March 3rd. Based on these parameters, target data retrieval statement 2 is determined to retrieve the number of visits on March 4th and March 3rd. Using target data retrieval statement 2, the number of visits on March 4th is found to be 15, and the number of visits on March 3rd is found to be 20. This does not meet the detection rule that the number of visits per day for a merchant must be greater than the number of visits on the previous day. Therefore, the data detection result is "failed". This can be subsequently displayed and alerted to business personnel via the client-side device.
[0058] By performing pre-verification on the objects to be detected, execution can continue only if the rules' operating conditions are met, thus avoiding the situation where the detection task cannot find the data that needs to be detected during runtime, thereby reducing the false alarm rate.
[0059] See Figure 2 , Figure 2 A flowchart of an object processing method according to an embodiment of this specification is shown, which specifically includes the following steps.
[0060] Step 202: Determine the first object to be detected corresponding to the first detection task.
[0061] Specifically, the object processing method provided in the embodiments of this specification can be applied to cloud-side devices. The cloud-side device can communicate with a data storage unit that needs to be detected, such as an enterprise database, and thus utilize the object processing method to detect the data stored in the data storage unit.
[0062] The object processing method provided in the embodiments of this specification can be used to detect enterprise databases. For example, manufacturing enterprises typically establish databases to record data information about the products they produce. This data information may include production volume, sales volume, etc. By detecting this data, the production status of the products can be monitored, facilitating the formulation of subsequent production strategies. This object processing method can also be used on e-commerce platforms. Multiple merchants may be registered on an e-commerce platform to sell their goods. The e-commerce platform can also establish a database to record the operating information of each merchant, such as sales revenue, number of visits, etc. By detecting the merchants' operating information, the operating status of the merchants registered on the e-commerce platform can be evaluated. It is understood that this object processing method can also be used in any scenario with a need for database detection; this specification does not limit its application.
[0063] Specifically, the first object to be detected can be determined when it is determined that the object to be detected has been updated. Alternatively, the first object to be detected can be determined based on business requirements. Furthermore, the first object to be detected can be determined according to a preset time interval; however, this embodiment does not limit the determination in this way.
[0064] In this context, the first detection task can be understood as any one of at least one detection task corresponding to the object to be detected. The object to be detected can be understood as data with detection requirements, such as the production volume of a product, its sales volume, or a merchant's sales revenue. The at least one detection task corresponding to the object to be detected can be understood as the detection content performed on the object, specifically a task to detect the fluctuation level of the object. For example, when the object to be detected is the production volume of a product, the at least one detection task could include checking whether the daily production volume is greater than 0, whether the daily production volume is greater than the previous day's sales volume, or whether the fluctuation rate between the daily production volume and the production volume over a historical period does not exceed a preset threshold. Updating the object to be detected can be understood as adding or changing the data of the object to be detected. For example, updating the production volume of a product could mean adding the production volume of the product on March 10th or changing the production volume of the product on March 9th. Detection tasks can be determined based on pre-set detection rules. For example, if the pre-set detection rule based on business needs is that the daily production volume is always greater than 0, then the detection task determined according to this rule is to check whether the daily production volume data in the table is greater than 0. In practical applications, the object to be detected can be offline data stored in a database.
[0065] The first object to be detected can include the updated object to be detected and the associated objects associated with it. The first object to be detected corresponding to the first detection task can be understood as the data to be detected involved in the first detection task. For example, for a detection task where the daily production volume needs to be greater than 0, the object to be detected for this detection task is the daily production volume. For a detection task where the daily production volume needs to be greater than the previous day's sales volume, the objects to be detected for this detection task are the daily production volume (the updated object to be detected) and the previous day's sales volume (the associated objects).
[0066] Based on this, when it is determined that data with detection requirements has been added or changed, the first detection task for that data can be determined, and the first object to be detected corresponding to the first detection task can be determined.
[0067] For example, when inspecting data in a database, to ensure the normal operation of a company's merchandise business, the production volume of a product should typically exceed its sales volume. This ensures normal sales and avoids supply shortages that could impact business operations. Based on this, it's possible to inspect whether the production volume of a product stored in the database exceeds its sales volume, facilitating the monitoring of the company's business operations. Therefore, the first inspection task could be "today's production volume is greater than yesterday's sales volume." This inspection can be conducted when the production volume or sales volume of a product is updated, or it can be conducted at preset time intervals based on business needs. Specifically, if it's determined that the production volume of a product has been updated, the first product to be inspected for the first inspection task "today's production volume is greater than yesterday's sales volume" can be determined by setting the current day's production volume and the previous day's sales volume.
[0068] In practical applications, databases typically store multiple tables. The first object to be detected can be stored in different partitions of the same table or in different tables. A partition can be understood as a collection of updated data within a table. For example, the production volume of a product can be stored in table A, and the sales volume can be stored in table B, as shown in Tables 1 and 2. Table 1 records the production volume of a product and its update time; for example, the production volume updated on March 1st is 100, and the production volume updated on March 3rd is 150, etc. Table 2 records the sales volume of a product and its update time; for example, the sales volume updated on March 1st is 100, and the sales volume updated on March 2nd is 80, etc. Accordingly, if an update to the production volume of goods in Table 1 is detected, the detection task "detect whether the production volume of the day is greater than the sales volume of the previous day" is determined. The updated detection object in the first detection object is the production volume of goods. According to the detection task, the associated object with the updated detection object is the sales volume of goods. The relevant parameters of the production volume of goods are determined as March 3, and the relevant parameters of the sales volume of goods are determined as March 2. This is to facilitate the subsequent determination of the target data acquisition statement based on the relevant parameters, thereby obtaining the data value of the production volume of goods updated on March 3 as 150 and the data value of the sales volume of goods updated on March 2 as 80.
[0069] Table 1
[0070] March 1 100 March 3 150
[0071] Table 2
[0072] March 1 100 March 2 80
[0073] In practical applications, testing personnel usually test the data stored in the database according to the testing requirements, or they will test the data stored in the database at preset time intervals. However, this method can lead to untimely data testing, which may result in data omissions. For example, data analysis may be performed using updated data, but the updated data contains anomalies. Because the data was not tested, the data analysis will be inaccurate, which will affect subsequent business operations.
[0074] Based on this, data in the database can be monitored, and data monitoring can be performed when an update is detected. The specific implementation method is as follows:
[0075] Determine at least one detection task corresponding to the updated object to be detected, including:
[0076] If the timestamp corresponding to the object to be detected is determined to be updated, then the object to be detected is determined to be updated; or
[0077] Upon receiving a data update notification for the object to be detected, it is determined that the object to be detected has been updated;
[0078] Identify at least one detection task corresponding to the updated object to be detected.
[0079] The timestamp corresponding to the object to be detected can be understood as the timestamp of the data stored in the database. When the data is updated, its corresponding timestamp will also change. Based on this, it can be determined whether the object to be detected has been updated based on the timestamp. The data update notification can be understood as the data update notification sent by the database storing the object to be detected.
[0080] Based on this, it is possible to determine that the object to be detected has been updated, either by confirming the timestamp update of the object to be detected or by receiving a data update notification from the database, and to determine at least one detection task corresponding to the updated object to be detected.
[0081] In practical applications, we can monitor whether the update time of the updated data partition in the corresponding data table on the data map is consistent with that in the database. If they are inconsistent, it indicates that the data in the data table has been updated, and subsequent detection steps are then executed. Specifically, a data update delay can be set; if the update time of the data partition is within the range of the data update delay, it indicates that the data has been updated.
[0082] In summary, by monitoring updates to the objects to be detected in the database, timely data detection is achieved, omissions in data detection are easily identified, and the accuracy and consistency of the data stored in the database are further guaranteed, thereby ensuring data quality.
[0083] In practical applications, when numerous business processes occur simultaneously, resulting in a large volume of data updates, a large number of data inspection tasks are submitted at the same time. This consumes the data inspection queue, and when the target project space queue resources are fully loaded, it's impossible to switch project spaces or provide backup. This leads to the creation of numerous quality inspection nodes and manual business processes, resulting in high resource consumption and an uncontrollable number of concurrent inspection tasks. Taking the e-commerce sector as an example, for the product indicator data stored in the enterprise database, since enterprises produce and sell many products, the inspection tasks differ depending on the business needs. For instance, for daily necessities or consumables with consistently high sales, the inspection task might be that daily sales are not less than the historical average sales over a given period. Therefore, monitoring the production volume of such products is also crucial; the inspection task could be that daily production volume exceeds the historical average sales over a given period to ensure normal sales and the smooth operation of the enterprise's product sales business. Based on this, each product can correspond to multiple inspection tasks, resulting in a large number of data inspection tasks. Furthermore, data updates stored in the database are typically performed at a fixed point in time, updating the indicator data of all products stored in the database simultaneously. While this ensures update efficiency with a single entry, it also means that multiple data detection tasks may exist at the same time. Currently, these multiple data detection tasks are directly submitted to the data detection queue, resulting in significant resource consumption and an inability to control the number of data detection tasks, thus reducing detection efficiency.
[0084] Based on this, a maximum number of concurrent execution tasks can be set for the execution space of the detection task to control the number of detection tasks. The specific implementation method is as follows: Before determining the first object to be detected corresponding to the first detection task, the method further includes:
[0085] Determine the execution space for performing the first detection task;
[0086] If it is determined that the number of detection tasks executed within the execution space has not reached a preset threshold, the step of determining the first object to be detected corresponding to the first detection task is executed.
[0087] Executing the first detection task can be understood as executing the data retrieval statement corresponding to that task. For example, if the first detection task is to check if the current day's production volume is greater than the previous day's sales volume, then the corresponding data retrieval statement can be understood as an SQL statement used to retrieve the current day's production volume and the previous day's sales volume. SQL, short for Structured Query Language, is a database language with multiple functions such as data manipulation and data definition. The execution space can be understood as the library used to execute SQL statements. The preset quantity threshold can be understood as the maximum number of tasks that the execution space can execute concurrently. For example, a preset quantity threshold of 50 means that 50 detection tasks can be executed concurrently within the execution space.
[0088] Based on this, the execution space used to perform the detection task can be determined, and the number of detection tasks currently being executed in the execution space can be determined. If the number of detection tasks currently being executed in the execution space does not reach the maximum number of tasks that the execution space can execute concurrently, the step of determining the first object to be detected corresponding to the first detection task can continue to be executed.
[0089] For example, the preset threshold for the number of execution spaces for executing the first detection task is determined to be 'a', and the number of detection tasks executed within this execution space is 'b'. If 'b' is less than 'a', it means that the execution space can still execute detection tasks, and in this case, the first object to be detected corresponding to the first detection task is determined to continue.
[0090] Accordingly, if the number of detection tasks executed within the execution space reaches a preset threshold, it means that no more detection tasks can be executed within that execution space. Execution must wait until any one of the detection tasks within that execution space has finished before continuing. The first detection task can be added to the queue of tasks to be executed. The specific implementation method is as follows:
[0091] After determining the execution space for performing the first detection task, the method further includes:
[0092] If the number of detection tasks executed within the execution space reaches a preset threshold, the first detection task is added to the queue of tasks to be executed.
[0093] If any detection task executed within the execution space is determined to be completed, the detection tasks in the queue of tasks to be executed are added to the execution space and executed according to their priority information.
[0094] The task queue to be executed can be understood as a queue used to place detection tasks. The priority information of the detection tasks can be used to indicate the importance of the detection tasks.
[0095] Specifically, if the number of detection tasks executed within the execution space reaches the maximum number of tasks that the execution space can execute concurrently, the first detection task can be added to the queue of tasks to be executed. Once it is determined that any detection task executed within the execution space has been completed, the highest priority detection task in the queue of tasks to be executed is added to the execution space and executed.
[0096] Continuing with the previous example, if the number of detection tasks b executed in the execution space is equal to the preset threshold a, it means that the first detection task can no longer be executed in the execution space. Therefore, the first detection task is added to the queue of tasks to be executed. If any one of the b detection tasks executed in the execution space is completed, then b-1 detection tasks are being executed in the execution space. Since b-1 is less than a, the highest priority detection task is added to the execution space and executed according to the priority information of the detection tasks in the queue of tasks to be executed. This process continues until all detection tasks in the queue of tasks to be executed have been added to the execution space.
[0097] Furthermore, when adding the first detection task to the task queue, its position within the queue can be determined based on its priority information. For example, if the task queue includes task 1 (priority 3), task 2 (priority 1), and task 3 (priority 1), and the first detection task 4 has a priority of 2, it can be added between task 1 and task 2 according to its priority. Similarly, when adding detection tasks from the task queue to the execution space, task 1 is added first, followed by the first detection task 4, according to priority. It's understandable that when detection tasks in the task queue have the same priority, one can be randomly selected for addition, or the task can be determined based on the order in which they were added to the task queue.
[0098] Specifically, for multiple data detection tasks submitted for multiple products, when these multiple data detection tasks are submitted to the execution space, the number and order of data detection tasks submitted to the execution space are controlled by the preset number threshold set in the execution space (i.e., the maximum number of tasks that the execution space can execute) and the priority set for each data detection task. This avoids consuming a lot of resources, ensures that the data detection tasks are executed in an orderly manner, and further improves the data detection task.
[0099] In summary, by controlling the number of concurrently executed tasks in the execution space and limiting the rate of detection tasks added to the execution space, if the maximum allowed number of tasks is exceeded, the task will wait for the preceding tasks in the execution space to complete before it is submitted. This ensures that a large number of tasks are not submitted at the same time, which would cause task backlog and resource contention, and will not affect other online tasks in the execution space, thereby avoiding the impact on data detection and further improving detection efficiency.
[0100] In practical applications, when performing data testing, a large number of testing tasks are often executed concurrently without prioritizing them. Because it's a manual business process, it's impossible to adjust task priorities. When execution space resources are scarce, resources cannot be acquired, and queue resources are also occupied, leading to deadlocks and amplified mutual impact. Taking the e-commerce example mentioned earlier, for product indicator data stored in an enterprise database, there may be multiple data testing tasks for each product. In practice, no priority is set for each data testing task beforehand, causing all data testing tasks to execute concurrently. Prioritization of each task is impossible during execution. When execution space resources are scarce, multiple concurrent data testing tasks can only wait, occupying queue resources and causing mutual interference. Data testing tasks already submitted to the execution space cannot be executed, and newly generated data testing tasks cannot be submitted, resulting in a decrease in data testing efficiency.
[0101] Therefore, priority information for detection tasks can be pre-configured before data detection, enabling customization of detection task configuration and ensuring flexibility in data detection. The specific implementation method is as follows:
[0102] Before determining the first object to be detected corresponding to the first detection task, the process also includes:
[0103] Receive task input instructions sent by the receiving end-side device to determine at least one initial detection task;
[0104] Receive a priority configuration instruction sent by the end-side device for the at least one initial detection task, and configure priority information for the at least one initial detection task;
[0105] From the at least one initial detection task, determine at least one detection task corresponding to the updated object to be detected.
[0106] Specifically, detection tasks and their priority information can be pre-configured by receiving instructions from the edge device. The system can accept task input instructions from the edge device, determine at least one initial detection task based on the task content carried in the instructions, and receive priority configuration instructions for each initial detection task from the edge device. Priority information can then be configured for each initial detection task based on the priority information carried in the priority configuration instructions. After determining at least one initial detection task and its priority information, at least one detection rule corresponding to the updated object to be detected can be determined from the at least one initial detection task.
[0107] In practical applications, before testing the product indicator data stored in the enterprise database, the testing personnel can configure testing tasks according to the enterprise's business needs and configure the priority information of each testing task to achieve the priority division of each testing task. In the subsequent data testing task execution process, each data testing task can be executed in an orderly manner according to the pre-configured priority information.
[0108] In summary, by pre-determining the initial detection tasks and their priority information, it is possible to prioritize each detection task. When execution space resources are scarce, higher-priority detection tasks can be processed first based on the priority information to ensure the implementation of detection tasks. Furthermore, the determination of detection tasks can be customized to ensure flexibility and meet different business needs.
[0109] In practical applications, the false positive rate is relatively high for cross-table detection or fluctuation-related detection. This is because the data to be detected is stored in different data tables. When detecting data, it is necessary to retrieve data from different data tables. However, due to update delays or faults, although data updates may be detected, the corresponding data cannot be retrieved from the tables. This can lead to the detection running before the dependent partitions or tables have been updated, resulting in false positives and affecting the detection of data. Taking the aforementioned e-commerce field as an example, in order to ensure the normal operation of the sales business, the daily production volume of a certain product is usually made to be greater than the previous day's sales volume. This ensures that the sales of the product can continue to operate normally and avoids stockouts. However, for the enterprise's internal database, the production volume and sales volume of a product are different indicators of the product and are usually stored in different data tables. For example, the production volume of a product may be stored in data table 1, while the sales volume of a product may be stored in data table 2. When the production volume of a product is updated, the production volume data can be obtained from data table 1. However, the sales volume of the product stored in data table 2 may not have been updated yet, which will result in the inability to obtain the sales volume data. In this case, the data detection task cannot run normally and will issue an alert. This type of alert is issued because the data cannot be obtained, rather than because the data does not meet the business requirements. This type of alert will produce false alarms, thereby affecting data detection.
[0110] Based on this, the execution conditions for the initial detection task can be pre-configured according to business needs, and whether the execution condition verification of the task needs to be enabled can be pre-configured. The specific implementation method is as follows:
[0111] Receive the task execution condition configuration instruction sent by the end-side device for the at least one initial detection task, and configure task execution condition information for the at least one initial detection task.
[0112] The task execution conditions can be understood as the conditions that the object to be detected must meet. For example, if the detection task is to check whether the production volume of the current day is greater than the sales volume of the previous day, then the task execution condition for this detection task can be set as the data table storing the production volume of the current day and the sales volume of the previous day. Only when the data to be detected in the data table meets this condition can the initial detection task be executed. Alternatively, the task execution condition could also be that the current partition at time t and the partition at time t-1 both exist, or that a certain partition in data table a and data table b both exist.
[0113] Based on this, task execution condition information can be configured for each initial detection task according to the task execution condition configuration instructions sent by the end device for each initial detection task.
[0114] In addition, it is possible to determine whether task execution condition verification needs to be enabled based on the instructions sent by the end device.
[0115] Specifically, before inspecting the data stored in the database, inspectors can configure task execution conditions for each data inspection task. For example, for the aforementioned task of inspecting product production and sales, inspectors can configure the task execution condition as "pre-verification is required to ensure that product production and sales are stored in the database," and enable this task execution condition verification. In this way, when the task is executed subsequently, the task execution condition verification will be performed first to determine whether the product production and sales to be inspected are stored in the database. The task will only be executed if the task execution condition verification passes, avoiding warnings due to the inability to obtain the required indicator data, thus preventing false alarms.
[0116] In summary, by enabling the pre-task execution condition verification, it can be ensured that the object to be detected meets the task execution conditions, so that the data detection will not report errors, thereby reducing the false alarm rate. Furthermore, by setting whether to enable task execution condition verification, the flexibility of the detection task configuration can be achieved.
[0117] Step 204: If it is determined that the first object to be detected meets the task execution conditions of the first detection task, determine the relevant parameters of the first object to be detected.
[0118] Specifically, after determining the first object to be detected corresponding to the first detection task, it can be determined whether the first object to be detected meets the task execution conditions of the first detection task. If so, the relevant parameters of the first object to be detected are determined.
[0119] In this context, the relevant parameters of the first object to be detected can be understood as parameters indicating its storage location in the database. For example, these parameters could be its time parameters, storage location parameters, etc. The task execution conditions can be understood as conditions specific to the first object to be detected. For instance, for a data detection task that checks the production and sales volume of goods, the task execution condition could be that both the production and sales volume are stored in the database. In other words, only when both production and sales volume are stored in the database can the production and sales data be retrieved from the database, thus completing the subsequent data detection task.
[0120] In specific implementation, if it is determined that the first object to be detected meets the task execution conditions of the first detection task, the relevant parameters of the first object to be detected are determined, including:
[0121] Determine whether the first object to be detected meets the task execution conditions of the first detection task;
[0122] If it is determined that the first object to be detected meets the task execution conditions of the first detection task, the relevant parameters of the first object to be detected are determined.
[0123] If it is determined that the first detection task does not meet the task execution conditions based on the first object to be detected, the first detection task is added to the task queue to be executed.
[0124] Specifically, it can be determined whether the first object to be detected meets the task execution conditions of the first detection task. If so, the relevant parameters of the storage location of the first object to be detected in the database are determined. If not, the first detection task is added to the queue of tasks to be executed.
[0125] In practical applications, when data is updated in the database, a data index is generated. Based on this data index, it can be determined whether the data has been updated. Therefore, the pre-verification can determine whether the data has been updated by querying the data index of the database, and thus determine whether the object to be detected exists.
[0126] For example, if the first detection task is to check whether the daily production volume of a product is greater than the previous day's sales volume, to ensure the normal operation of this task, both the daily production volume and the previous day's sales volume must be stored in the database to retrieve this data. Therefore, the first objects to be detected are the daily production volume and the previous day's sales volume. The execution condition for the first detection task is that the database stores these two data. If the database contains these data, the time parameters and data table information parameters corresponding to the daily production volume and the previous day's sales volume are determined to facilitate subsequent data retrieval. If the database does not store the daily production volume and / or the previous day's sales volume, it means that the current first object to be detected does not meet the task execution condition. In this case, the first detection task is added to the pending task queue for further verification.
[0127] In summary, by enabling pre-checking, it is possible to determine whether the first object to be detected meets the task execution rules, thereby ensuring the effectiveness of the detection task and reducing the false alarm rate.
[0128] Furthermore, when determining the relevant parameters of the first object to be detected, the need to enable pre-parameter retrieval can be determined based on a pre-configured instruction indicating whether pre-parameter retrieval is required. When pre-parameter retrieval is configured to be required, the relevant parameters of the first object to be detected are retrieved; for example, the two most recent partitions of the data table can be retrieved to prevent situations where partitions fail to produce data according to the scheduling cycle due to excessively long execution times, thus causing rule execution failure. When pre-parameter retrieval is not required, the relevant parameters of the first object to be detected can be determined directly based on the detection rules corresponding to the first detection task. For example, if the first detection task is to check whether the production volume on March 2nd is greater than 0, then the time parameter of the first object to be detected is March 2nd.
[0129] Step 206: Determine the target data acquisition statement corresponding to the first object to be detected based on the relevant parameters of the first object to be detected.
[0130] Specifically, after determining the relevant parameters of the first object to be detected, the target data acquisition statement corresponding to the first object to be detected can be determined based on these relevant parameters.
[0131] The target data retrieval statement can be understood as an SQL statement used to retrieve data from the object to be detected. By running this target data retrieval statement, the data of the object to be detected can be obtained.
[0132] In practice, an initial SQL statement for data acquisition can be determined, and then the relevant parameters of the object to be detected can be added to this initial SQL statement. The resulting target SQL statement can then retrieve the data of the object to be detected from the data table corresponding to the relevant parameters. The specific implementation method is as follows:
[0133] The step of determining the target data acquisition statement corresponding to the first object to be detected based on the relevant parameters of the first object to be detected includes:
[0134] Determine the initial data retrieval statement;
[0135] Add the relevant parameters of the first object to be detected to the initial data acquisition statement to obtain the target data acquisition statement corresponding to the first object to be detected.
[0136] The initial data acquisition statement can be understood as an SQL statement used to acquire data, while the target data acquisition statement can be understood as an SQL statement used to acquire data of the object to be detected.
[0137] Specifically, the initial SQL statement for retrieving user data can be obtained from the SQL statement library, and the relevant parameters of the first object to be detected can be added to the initial SQL statement to obtain the target SQL statement for retrieving the data of the first object to be detected.
[0138] In addition, for the SQL statements for data acquisition, data detection, and data detection result output that need to be submitted sequentially during the data detection process, data acquisition can be achieved using only a single target SQL statement for data acquisition, as described above. Alternatively, the SQL statements for data acquisition, data detection, and data detection result output can be aggregated to obtain an aggregated target statement. Running this target statement will then yield the data detection result.
[0139] In summary, by determining the target data acquisition statement based on the relevant parameters of the first object to be detected, the data of the first object to be detected can be obtained when the subsequent target data acquisition statement is executed. The data acquisition can be achieved using only the SQL statement for data acquisition, which facilitates the subsequent detection of the acquired data and improves the detection efficiency.
[0140] Step 208: Use the target data acquisition statement to obtain the data corresponding to the first object to be detected, and perform detection on the data corresponding to the first object to be detected to obtain the data detection result.
[0141] Specifically, after obtaining the target data retrieval statement, this statement can be used to retrieve the data corresponding to the first object to be detected, and it can be determined whether the data corresponding to the first object to be detected meets the first detection rule, thereby obtaining the data detection result. Furthermore, the data detection result can be sent to the edge device, which can then display it to business personnel.
[0142] In practical applications, data inspection often involves multiple SQL statements. For example, a single inspection task might execute multiple SQL statements sequentially, including data retrieval, conditional, and result output statements. This means a quality inspection task requires submitting multiple SQL statements to obtain results. This process consumes significant execution space and is prone to deadlocks because submitting SQL statements consumes process resources without releasing them, causing the task's execution process to fail and ultimately leading to data inspection failure. Furthermore, since the SQL statements execute sequentially, subsequent statements must wait for the preceding SQL statement to complete successfully before the entire inspection task can finish. This can significantly increase execution time under resource constraints.
[0143] Based on this, we can execute only the target data acquisition statement and obtain the data corresponding to the first object to be detected based on the execution result. The specific implementation method is as follows:
[0144] The step of obtaining the data corresponding to the first object to be detected using the target data acquisition statement includes:
[0145] The target data acquisition statement is added to the execution space and executed. The data corresponding to the first object to be detected is obtained based on the execution result.
[0146] Specifically, the target data acquisition statement can be executed in the execution space, and the data corresponding to the first object to be detected can be obtained based on the execution result.
[0147] Furthermore, the target data acquisition statement can be obtained by aggregating multiple detection SQL statements, so that subsequent data detection only requires a single SQL statement.
[0148] In summary, by retrieving the data corresponding to the first object to be detected using only a single target data retrieval statement, the number of SQL statements can be reduced, deadlocks can be avoided, and thus the execution time of the detection task can be reduced. Furthermore, the task detail data can be adjusted to be retrieved according to business requirements, thereby reducing the number of tasks.
[0149] In summary, the above method determines the detection task and verifies the object to be detected. When the object to be detected meets the task execution conditions, the relevant parameters of the object to be detected are determined, thereby determining the target data acquisition statement to obtain the data corresponding to the object to be detected. This facilitates data detection, and the pre-verification of the object to be detected avoids false alarms, thereby improving detection efficiency. It also facilitates subsequent adjustment or alarm of abnormal data based on the data detection results, ensuring data quality.
[0150] The following is in conjunction with the appendix Figure 3 Taking the application of the object processing method provided in this specification in data detection as an example, the object processing method will be further explained. Among other things, Figure 3 The present specification illustrates a flowchart of an object processing method provided in one embodiment. This object processing method is applied to cloud-side devices and specifically includes the following steps.
[0151] Step 302: If it is determined that the object to be detected has been updated, determine the first object to be detected corresponding to the first detection task.
[0152] Specifically, in a product data monitoring scenario for enterprise production, given that the product sales data stored in the enterprise database has been updated, the first monitoring task can be defined as "checking whether the daily product sales are not less than the average daily product sales over the past 7 days." The first object to be monitored for this first monitoring task is the daily product sales and the daily product sales over the past 7 days. This first monitoring task can be pre-configured based on the enterprise's business needs. Based on the enterprise's historical sales data, if the product, as a daily consumable, has maintained stable sales for a period without a decline, then to monitor the product's sales, it's necessary to check the product's sales data stored in the database. Therefore, the first monitoring task can be configured as "checking whether the daily product sales are not less than the average daily product sales over the past 7 days."
[0153] Step 304: Add the first detection task to the queue of tasks to be executed according to the priority information of the first detection task.
[0154] Specifically, before data inspection, business personnel can configure the task information and priority information of the inspection tasks through the edge device. Based on this, the first inspection task can be added to the task queue to be executed according to the pre-configured priority information.
[0155] Step 306: Based on the priority information of the detection tasks in the task queue, submit the detection tasks whose priority reaches the preset priority threshold.
[0156] Specifically, this embodiment of the specification takes the example of the first detection task reaching a preset priority threshold as an example. The detection task submitted here with a priority reaching the preset priority threshold is the first detection task.
[0157] Specifically, if the priority information for the first detection task is pre-configured as 1, indicating the highest priority, then the first detection task with priority information of 1 will be submitted.
[0158] Step 308: Determine the execution space for the first detection task.
[0159] Step 310: Determine whether the number of detection tasks executed within the execution space has reached a preset threshold. If yes, proceed to step 304; otherwise, proceed to step 312.
[0160] Specifically, if the number of detection tasks executed within the execution space does not reach a preset threshold, the first detection task can be added to the execution space for subsequent execution. If the number of detection tasks executed within the execution space reaches the preset threshold, the first detection task can be added to the queue of tasks to be executed.
[0161] Understandably, steps 304 and 306 can be skipped before verifying the number of detection tasks executed in the execution space. That is, after determining the first detection task and the first object to be detected in step 302, the number of detection tasks executed in the execution space can be directly verified. If the number reaches the preset threshold, the first detection task can be added to the task queue to wait for execution according to the priority information of the first detection task.
[0162] Step 312: Determine whether the first object to be detected meets the task execution conditions of the first detection task. If yes, proceed to step 314. If no, proceed to step 304.
[0163] Specifically, before executing step 312, it can be determined whether the first detection task has enabled pre-verification based on the configuration information of the first detection task. If it is enabled, then execute step 312; if it is not enabled, then directly execute step 314.
[0164] The configuration information for the first detection task can be selected or entered by business personnel through the terminal device. In one embodiment of this specification, if pre-verification is enabled, the configuration information can be represented by 1. If pre-verification is not enabled, the configuration information can be represented by 0.
[0165] With pre-verification enabled, business personnel can configure the task execution conditions for the first detection task via the client-side device. For example, for the first detection task "Check whether the daily sales volume of goods is not less than the average daily sales volume of goods over the past 7 days", the task execution conditions could be "The daily sales volume of goods is stored in the enterprise database and the daily sales volume of goods over the past 7 days is also stored in the enterprise database". Specifically, it can be verified whether the daily sales volume of goods to be detected and the daily sales volume of goods over the past 7 days are stored in the enterprise database. If so, it means that the first item to be detected meets the task execution conditions of the first detection task.
[0166] Step 314: Determine the relevant parameters of the first object to be detected.
[0167] Specifically, step 314 can be understood as the step of obtaining pre-parameters. Similarly, before executing step 314, it can be determined whether the first detection task has enabled pre-parameter acquisition based on its configuration information. If so, step 314 is executed; otherwise, the relevant parameters of the first object to be detected can be determined directly based on the first detection task. Furthermore, whether to start pre-parameter acquisition is configured by the business personnel for the first detection task via the edge device before data detection.
[0168] For the first detection task, "Check whether the sales volume of goods on the current day is not less than the average sales volume of goods per day in the past 7 days", and the task execution condition information of the first detection task, "the sales volume of goods on the current day is stored in the enterprise database and the sales volume of goods per day in the past 7 days is also stored in the enterprise database", business personnel can configure the first detection task to enable the acquisition of pre-parameters. At this time, it is necessary to obtain the time parameter of the sales volume of goods on the current day and the time parameter of the sales volume of goods per day in the past 7 days.
[0169] Step 316: Determine the target data acquisition statement corresponding to the first object to be detected based on the relevant parameters of the first object to be detected.
[0170] Specifically, continuing with the previous example, for the first detection task, "to detect whether the daily sales volume is not less than the average daily sales volume over the past 7 days," in order to run this task, the county needs to retrieve the daily sales volume data and the daily sales volume data over the past 7 days from the database. The time parameters for the daily and daily sales volumes can be added to the SQL statement used for data retrieval, resulting in the target data retrieval statement. This target data retrieval statement can then be used to retrieve the daily and daily sales volume data over the past 7 days.
[0171] Step 318: Use the target data acquisition statement to obtain the data corresponding to the first object to be detected, and perform detection on the data corresponding to the first object to be detected to obtain the data detection result.
[0172] Specifically, when retrieving daily sales data and daily sales data for the past 7 days based on the target data retrieval statement, the target data retrieval statement can be executed in the execution space. Based on the execution result, the specific values of daily sales and daily sales for the past 7 days can be obtained, and the average value of daily sales for the past 7 days can be calculated. This determines whether the data meets the detection rule corresponding to the first detection task, "Daily sales should not be less than the average value of daily sales for the past 7 days," thereby obtaining the data detection result.
[0173] In addition, the data detection results can be sent to the edge device, which can then display them to business personnel.
[0174] In summary, the above method determines the detection task and verifies the object to be detected. When the object to be detected meets the task execution conditions, the relevant parameters of the object to be detected are determined, thereby determining the target data acquisition statement to obtain the data corresponding to the object to be detected. This facilitates data detection, and the pre-verification of the object to be detected avoids false alarms, thereby improving detection efficiency. It also facilitates subsequent adjustment or alarm of abnormal data based on the data detection results, ensuring data quality.
[0175] Corresponding to the above method embodiments, this specification also provides embodiments of an object processing apparatus. Figure 4 A schematic diagram of an object processing apparatus according to one embodiment of this specification is shown. Figure 4 As shown, the device includes:
[0176] The first determining module 402 is configured to determine the first object to be detected corresponding to the first detection task;
[0177] The second determining module 404 is configured to determine the relevant parameters of the first object to be detected when it is determined that the first object to be detected meets the task execution conditions of the first detection task.
[0178] The third determining module 406 is configured to determine the target data acquisition statement corresponding to the first object to be detected based on the relevant parameters of the first object to be detected.
[0179] The detection module 408 is configured to use the target data acquisition statement to acquire the data corresponding to the first object to be detected, to detect the data corresponding to the first object to be detected, and to obtain the data detection result.
[0180] In an optional embodiment, the second determining module 404 is further configured to:
[0181] Determine whether the first object to be detected meets the task execution conditions of the first detection task;
[0182] If it is determined that the first object to be detected meets the task execution conditions of the first detection task, the relevant parameters of the first object to be detected are determined.
[0183] In an optional embodiment, the apparatus further includes a receiving module configured to:
[0184] Receive task input instructions sent by the receiving end-side device to determine at least one initial detection task;
[0185] Receive a priority configuration instruction sent by the end-side device for the at least one initial detection task, and configure priority information for the at least one initial detection task;
[0186] From the at least one initial detection task, determine at least one detection task corresponding to the updated object to be detected.
[0187] In an optional embodiment, the receiving module is further configured to:
[0188] Receive the task execution condition configuration instruction sent by the end-side device for the at least one initial detection task, and configure task execution condition information for the at least one initial detection task.
[0189] In an optional embodiment, the first determining module 402 is further configured to:
[0190] Determine the execution space for performing the first detection task;
[0191] If it is determined that the number of detection tasks executed within the execution space has not reached a preset number threshold, the step of determining the first object to be detected corresponding to the first detection task is executed.
[0192] In an optional embodiment, the detection module 408 is further configured to:
[0193] The target data acquisition statement is added to the execution space and executed. The data corresponding to the first object to be detected is obtained based on the execution result.
[0194] In an optional embodiment, the first determining module 402 is further configured to:
[0195] If the number of detection tasks executed within the execution space reaches a preset threshold, the first detection task is added to the queue of tasks to be executed.
[0196] If any detection task executed within the execution space is determined to be completed, the detection tasks in the queue of tasks to be executed are added to the execution space and executed according to their priority information.
[0197] In an optional embodiment, the third determining module 406 is further configured to:
[0198] Determine the initial data retrieval statement;
[0199] Add the relevant parameters of the first object to be detected to the initial data acquisition statement to obtain the target data acquisition statement corresponding to the first object to be detected.
[0200] In an optional embodiment, the second determining module 404 is further configured to:
[0201] If it is determined that the first detection task does not meet the task execution conditions based on the first object to be detected, the first detection task is added to the task queue to be executed.
[0202] In an optional embodiment, the first determining module 402 is further configured to:
[0203] If the timestamp corresponding to the object to be detected is determined to be updated, then the object to be detected is determined to be updated; or
[0204] Upon receiving a data update notification for the object to be detected, it is determined that the object to be detected has been updated;
[0205] Identify the first object to be detected corresponding to the first detection task.
[0206] In summary, the aforementioned device determines the detection task and verifies the object to be detected. When the object to be detected meets the task execution conditions, it determines the relevant parameters of the object to be detected, thereby determining the target data acquisition statement to obtain the data corresponding to the object to be detected. This facilitates data detection, and the pre-verification of the object to be detected avoids false alarms, thereby improving detection efficiency. It also facilitates subsequent adjustment or alarm of abnormal data based on the data detection results, ensuring data quality.
[0207] The above is an illustrative scheme of an object processing apparatus according to this embodiment. It should be noted that the technical solution of this object processing apparatus and the technical solution of the object processing method described above belong to the same concept. For details not described in detail in the technical solution of the object processing apparatus, please refer to the description of the technical solution of the object processing method described above.
[0208] See Figure 5 , Figure 5 A flowchart of another object processing method according to an embodiment of this specification is shown. Applied to an edge device, before data detection, in order to ensure the customization and flexibility of the detection task, business personnel need to pre-configure the detection task and detection rules through the edge device, which specifically includes the following steps.
[0209] Step 502: If a touch operation is detected on the display interface and it is determined that the touch operation triggers a data detection request, the task configuration interface is displayed on the display interface.
[0210] The display interface can be understood as the interface presented by the terminal device to business personnel. Touch operations can be understood as the operations performed by business personnel on the display interface, including but not limited to mouse clicks, double clicks, selection boxes, swipes, and keyboard input.
[0211] Based on this, when the edge device detects a touch operation on the display interface and determines that the touch operation triggers a data detection request, it displays a task configuration interface to the business personnel through the display interface, so that the business personnel can configure the detection task in the task configuration interface.
[0212] Step 504: Detect touch operations on the first control in the task configuration interface, determine the corresponding task configuration information, and generate at least one initial detection task, wherein the first control is any one of at least one control on the task configuration interface.
[0213] Specifically, a touch operation is detected on any one of the controls in the task configuration interface, the business configuration information corresponding to the touch operation is determined, and at least one initial detection task is generated.
[0214] It is understandable that the initial detection task can be generated on the edge device, or the service configuration information can be sent to the cloud device and the initial detection task can be generated on the cloud device.
[0215] In practice, the controls on the task configuration interface can include selection controls and input controls. Therefore, when determining the corresponding task configuration information, configuration can be based on input operations and / or touch operations, as implemented below:
[0216] The detection targets touch operations on the first control in the task configuration interface, determines the corresponding task configuration information, and generates at least one initial detection task, including:
[0217] Detect input operations and / or touch operations on the input controls and / or selection controls in the task configuration interface, and determine the corresponding task information, priority information and task execution condition information corresponding to the task information;
[0218] Based on the task information, as well as the priority information and task execution condition information corresponding to the task information, at least one initial detection task is generated.
[0219] Specifically, it can detect input operations on input controls in the task configuration interface to determine the corresponding task information. It can also detect input operations on input controls and / or touch operations on selection controls in the task configuration interface to determine the priority information and task execution conditions corresponding to the task information.
[0220] For example, the task configuration interface can display input boxes, where the edge device receives task information entered by business personnel. The task configuration interface can also display checkboxes, where the edge device receives selections made by business personnel, thereby configuring priority and execution conditions for the detection task. Alternatively, the edge device can also receive priority and execution conditions for the detection task entered by business personnel in the input boxes.
[0221] Accordingly, the edge device can generate at least one initial detection task based on the task information, as well as the corresponding priority information and task execution conditions. Alternatively, the task information, as well as the corresponding priority information and task execution conditions, can be sent to the cloud-side device, which will then generate at least one initial detection task.
[0222] Step 506: Receive the data detection results obtained based on the at least one initial detection task, and display the data detection results through the display interface.
[0223] Specifically, after configuring the initial detection task on the edge device, it can receive the data detection results obtained based on the initial detection task from the cloud device and display these results to business personnel through a display interface. The data detection results may include information such as the detection task, detection rules, detection time, and target data acquisition statements, allowing business personnel to understand the details of the data detection.
[0224] In addition, when the data detection result is unsatisfactory, an alarm notification can be generated based on the task information of the detection task and the data detection result. The alarm notification can be displayed to business personnel through push notifications or message reminders to increase their awareness of the alarm notification.
[0225] In summary, by configuring detection tasks on the edge device and displaying the data detection results, data detection can be achieved, which facilitates subsequent adjustments or alarms for abnormal data based on the data detection results, thus ensuring data quality.
[0226] See Figure 6 , Figure 6 This diagram illustrates a scenario illustrating an object processing method provided in one embodiment of this specification. Figure 6 As shown, the edge device 602 can display a task configuration interface to business personnel. Business personnel can input and select options on the task configuration interface to configure the detection task. For example, they can input the task information "No records with the same primary key should exist in the table" through the input box on the task configuration interface, and input the priority information of the detection task as 1. They can select whether to enable pre-verification and pre-parameters for the detection task through the checkboxes on the task configuration interface, and can also input information such as the table name of the data table to be detected. After configuring the detection task information on the task configuration interface, the confirmed detection task can be sent to the cloud device 604, or the series of information can be sent to the cloud device 604, which will then confirm the corresponding detection task.
[0227] The cloud-side device 604 executes the aforementioned object processing method, performs detection on the data stored in the data table based on the detection task, and finally obtains the data detection results. These results are then sent to the edge device 602 and displayed to the user through a display interface. As shown in Table 3, the data detection results may include information such as the table name of the detected data table, the number of detected data items, the number of detection tasks, the status of the detection tasks, and the number of failed detection tasks. The data detection results can be displayed to business personnel in a list format on the display interface. Correspondingly, selection controls can also be displayed on the display interface for the data detection results. Business personnel can process the data detection results by clicking or using other methods to select the control.
[0228] Table 3
[0229] Table A 1 7 fail 2 Table B 1 6 fail 1 Table C 2 2 success 0
[0230] In addition, for data detection results of failed detection tasks, cloud-side device 604 can also send alarm information to business personnel through other end-side devices 602. The alarm information includes alarm time, table name of the data table being detected, task information of the detection task, detection fields, detection rules corresponding to the detection task, etc.
[0231] Corresponding to the above method embodiments, this specification also provides another embodiment of an object processing apparatus applied to an end-side device. Figure 7 A schematic diagram of another object processing apparatus provided in one embodiment of this specification is shown. For example... Figure 7 As shown, the device includes:
[0232] The display module 702 is configured to detect a touch operation on the display interface and, if it is determined that the touch operation triggers a data detection request, display the task configuration interface through the display interface.
[0233] The generation module 704 is configured to detect touch operations on the first control in the task configuration interface, determine the corresponding task configuration information, and generate at least one initial detection task, wherein the first control is any one of at least one control on the task configuration interface.
[0234] The receiving module 706 is configured to receive data detection results obtained based on the at least one initial detection task and display the data detection results through the display interface.
[0235] In an optional embodiment, the control includes an input control and a selection control; the generation module 704 is further configured to:
[0236] Detect input operations and / or touch operations on the input controls and / or selection controls in the task configuration interface, and determine the corresponding task information, priority information and task execution condition information corresponding to the task information;
[0237] Based on the task information, as well as the priority information and task execution condition information corresponding to the task information, at least one initial detection task is generated.
[0238] In summary, by configuring detection tasks on the edge device and displaying the data detection results, data detection can be achieved, which facilitates subsequent adjustments or alarms for abnormal data based on the data detection results, thus ensuring data quality.
[0239] Corresponding to the above method embodiments, this specification also provides object processing system embodiments. Figure 8 A schematic diagram of the structure of an object processing system provided in one embodiment of this specification is shown. Figure 8 As shown, the system 800 includes:
[0240] The object detection unit 802 and the data storage unit 804, wherein,
[0241] The object detection unit 802 is used to execute the above object processing method, and the data storage unit 804 is used to store the object to be detected and the data corresponding to the object to be detected.
[0242] The data storage unit can be understood as a database that stores data.
[0243] Specifically, the object detection unit 802 can be used to execute the above-mentioned object processing method to detect the object to be detected and the corresponding data stored in the data storage unit 804.
[0244] It should be noted that the object detection unit 802 in this system can detect data stored in multiple data storage units 804.
[0245] The object detection method described above can be applied to the e-commerce field to detect product indicator data. Based on this, corresponding to the above method embodiments, this specification also provides an embodiment of a product data detection method, which includes:
[0246] Determine the first indicator to be detected corresponding to the first detection task, wherein the first indicator to be detected is the indicator to be detected for the target product;
[0247] If it is determined that the first indicator to be detected meets the task execution conditions of the first detection task, the relevant parameters of the first indicator to be detected are determined.
[0248] Based on the relevant parameters of the first indicator to be detected, determine the target data acquisition statement corresponding to the first indicator to be detected;
[0249] The target data acquisition statement is used to obtain the data corresponding to the first indicator to be detected, and the data corresponding to the first indicator to be detected is detected to obtain the data detection result.
[0250] Here, the first indicator to be detected can be understood as the aforementioned first object to be detected, such as the production volume, sales volume, or other indicator data of the target product. The target product can be understood as a product with detection requirements. The first detection task can be understood as a pre-configured data detection task for the indicator data of the target product, which can be configured according to business needs.
[0251] Specifically, upon determining that the target product's indicator data has been updated, or according to a preset time interval, a pre-configured data detection task for the target product's indicator data can be determined. It is then determined whether the first indicator to be detected meets the task execution conditions of this data detection task. If the first indicator to be detected meets the task execution conditions, the relevant parameters of the first indicator are determined, thereby determining the target data acquisition statement. This target data acquisition statement is then used to obtain the data corresponding to the first indicator to be detected, thus obtaining the data detection result.
[0252] For example, regarding the production volume of a target product, to ensure its sales, the daily production volume should be greater than 0. Based on this, the data detection task configured for this production volume could be "detecting whether the daily production volume of the product is greater than 0." If the daily production volume of the target product stored in the database is updated, it can be determined whether the daily production volume is stored in the database. If so, the time parameters and / or storage location parameters of the daily production volume are determined. These time parameters and / or storage location parameters are added to the SQL statement used for data retrieval, thus determining the target data retrieval statement. Running this target data retrieval statement retrieves the daily production volume data of the product from the database and performs detection on this data to obtain the data detection results. If the daily production volume data is greater than 0, it indicates that the updated daily production volume in the database meets business requirements. If the daily production volume data is less than 0, it indicates that the updated daily production volume in the database does not meet business requirements and there is an anomaly. An alarm is then sent to the detection personnel. The detection personnel can use this alarm to investigate the database, determining whether the problem stems from abnormal business operations or errors in entering production volume data into the database, and further determine subsequent strategies.
[0253] See Figure 9 , Figure 9This specification illustrates a framework diagram of another object processing system provided in one embodiment. The system may include multiple end-side devices 902 and a cloud-side device 904. The multiple end-side devices 902 can establish communication connections through the cloud-side device 904. In a data detection scenario, the cloud-side device 904 provides data detection services between the multiple end-side devices 902. Each end-side device 902 can act as a display terminal, receiving and displaying the data detection results sent by the cloud-side device 904.
[0254] Users can interact with cloud-side device 904 through edge device 902 to receive data sent by other edge devices 902, or send data to other edge devices 902. In a data detection scenario, users can publish task configuration information to cloud-side device 904 through edge device 902. Cloud-side device 904 determines the detection task based on the configuration information, obtains the data detection results, and pushes the data detection results to other edge devices 902 that have established communication.
[0255] In this setup, the client-side device 902 and the cloud-side device 904 establish a connection via a network. The network provides a communication link between the client and the server. The network can include various connection types, such as wired or wireless communication links or fiber optic cables. The data transmitted by the client-side device 902 may need to undergo encoding, transcoding, compression, or other processing before being published to the cloud-side device 904.
[0256] The edge device 902 can be a browser, an app (application), a web application such as an H5 (HyperText Markup Language 5) application, a lightweight application (also known as a mini-program), or a cloud application. The edge device 902 can be developed based on a software development kit (SDK) provided by the server, such as a real-time communication (RTC) SDK. The edge device 902 can be deployed in an electronic device and depends on the device's operation or certain apps within the device to run. Electronic devices may have displays and support information browsing, such as personal mobile terminals like smartphones, tablets, and personal computers. Various other types of applications can also be configured in electronic devices, such as human-computer interaction applications, model training applications, text processing applications, web browser applications, shopping applications, search applications, instant messaging tools, email clients, and social media platform software.
[0257] Cloud-side device 904 can include servers providing various services, such as servers providing communication services for multiple front-ends, servers supporting backend training for models used on the front-ends, and servers processing data sent by the front-ends. It should be noted that cloud-side device 904 can be implemented as a distributed server cluster composed of multiple servers, or as a single server. The server can also be a server in a distributed system, or a server integrated with blockchain. The server can also be a cloud server providing basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, content delivery networks (CDNs), and big data and artificial intelligence platforms, or an intelligent cloud computing server or intelligent cloud host with artificial intelligence technology.
[0258] It is worth noting that the object processing methods provided in the embodiments of this specification are generally executed by the server. However, in other embodiments of this specification, the client may also have similar functionality to the server, thereby executing the object processing methods provided in the embodiments of this specification. In other embodiments, the object processing methods provided in the embodiments of this specification may also be executed jointly by the client and the server.
[0259] Figure 10 A structural block diagram of a computing device 1000 according to one embodiment of this specification is shown. The components of the computing device 1000 include, but are not limited to, a memory 1010 and a processor 1020. The processor 1020 is connected to the memory 1010 via a bus 1030, and a database 1050 is used to store data.
[0260] The computing device 1000 also includes an access device 1040, which enables the computing device 1000 to communicate via one or more networks 1060. Examples of these networks include Public Switched Telephone Network (PSTN), Local Area Network (LAN), Wide Area Network (WAN), Personal Area Network (PAN), or combinations of communication networks such as the Internet. The access device 1040 may include one or more of any type of wired or wireless network interface (e.g., a network interface card (NIC)), such as an IEEE 802.11 Wireless Local Area Network (WLAN) wireless interface, a Wi-MAX (Worldwide Interoperability for Microwave Access) interface, an Ethernet interface, a Universal Serial Bus (USB) interface, a cellular network interface, a Bluetooth interface, a Near Field Communication (NFC) interface, and so on.
[0261] In one embodiment of this application, the aforementioned components of the computing device 1000 and Figure 10 Other components, not shown, can also be connected to each other, for example, via a bus. It should be understood that... Figure 10 The block diagram of the computing device shown is for illustrative purposes only and is not intended to limit the scope of this application. Those skilled in the art can add or replace other components as needed.
[0262] The computing device 1000 can be any type of stationary or mobile computing device, including mobile computers or mobile computing devices (e.g., tablet computers, personal digital assistants, laptop computers, notebook computers, netbooks, etc.), mobile phones (e.g., smartphones), wearable computing devices (e.g., smartwatches, smart glasses, etc.) or other types of mobile devices, or stationary computing devices such as desktop computers or personal computers (PCs). The computing device 1000 can also be a mobile or stationary server.
[0263] The processor 1020 is configured to execute the following computer-executable instructions, which, when executed by the processor, implement the steps of the above method.
[0264] The above is an illustrative scheme of a computing device according to this embodiment. It should be noted that the technical solution of this computing device and the technical solution of the object processing method described above belong to the same concept. For details not described in detail in the technical solution of the computing device, please refer to the description of the technical solution of the method described above.
[0265] An embodiment of this specification also provides a computer-readable storage medium storing computer-executable instructions that, when executed by a processor, implement the steps of the above-described method.
[0266] The above is an illustrative scheme of a computer-readable storage medium according to this embodiment. It should be noted that the technical solution of this storage medium and the technical solution of the object processing method described above belong to the same concept. For details not described in detail in the technical solution of the storage medium, please refer to the description of the technical solution of the method described above.
[0267] An embodiment of this specification also provides a computer program, wherein when the computer program is executed in a computer, it causes the computer to perform the steps of the above-described method.
[0268] The above is an illustrative example of a computer program according to this embodiment. It should be noted that the technical solution of this computer program and the technical solution of the object processing method described above belong to the same concept. Details not described in detail in the computer program's technical solution can be found in the description of the technical solution of the method described above.
[0269] The foregoing has described specific embodiments of this specification. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recited in the claims may be performed in a different order than that shown in the embodiments and may still achieve the desired result. Furthermore, the processes depicted in the drawings do not necessarily require the specific or sequential order shown to achieve the desired result. In some embodiments, multitasking and parallel processing are possible or may be advantageous.
[0270] The computer instructions include computer program code, which may be in the form of source code, object code, executable file, or certain intermediate forms. The computer-readable medium may include: any entity or device capable of carrying the computer program code, recording media, USB flash drive, portable hard drive, magnetic disk, optical disk, computer memory, read-only memory (ROM), random access memory (RAM), electrical carrier signals, telecommunication signals, and software distribution media, etc. It should be noted that the content included in the computer-readable medium may be appropriately added or removed according to the requirements of patent practice. For example, in some regions, according to patent practice, computer-readable media may not include electrical carrier signals and telecommunication signals.
[0271] It should be noted that, for the sake of simplicity, the foregoing method embodiments are all described as a series of actions. However, those skilled in the art should understand that the embodiments in this specification are not limited to the described order of actions, because according to the embodiments in this specification, some steps can be performed in other orders or simultaneously. Furthermore, those skilled in the art should also understand that the embodiments described in this specification are all preferred embodiments, and the actions and modules involved are not necessarily essential to the embodiments in this specification.
[0272] In the above embodiments, the descriptions of each embodiment have different focuses. For parts not described in detail in a certain embodiment, please refer to the relevant descriptions of other embodiments.
[0273] The preferred embodiments disclosed above are merely illustrative of this specification. The optional embodiments do not exhaustively describe all details, nor do they limit the invention to the specific implementations described. Clearly, many modifications and variations can be made based on the embodiments described herein. These embodiments are selected and specifically described in this specification to better explain the principles and practical applications of the embodiments, thereby enabling those skilled in the art to better understand and utilize this specification. This specification is limited only by the claims and their full scope and equivalents.
Claims
1. An object processing method, comprising: Determine the first object to be detected corresponding to the first detection task; The first object to be detected includes data that requires detection; Determine whether the number of detection tasks executed within the execution space of the first detection task reaches a preset threshold. If not, determine whether the first object to be detected meets the task execution conditions of the first detection task. If it is determined that the first object to be detected meets the task execution conditions of the first detection task, the relevant parameters of the first object to be detected are determined. The task execution conditions include that the partition of the first object to be detected exists at time t and the partition at time t-1, or that the partition of the first object to be detected exists in both data table a and data table b. Based on the relevant parameters of the first object to be detected, determine the target data acquisition statement corresponding to the first object to be detected; The target data acquisition statement is used to obtain the data corresponding to the first object to be detected, and the data corresponding to the first object to be detected is detected to obtain the data detection result.
2. The method according to claim 1, further comprising, before determining the first object to be detected corresponding to the first detection task: Receive task input instructions sent by the receiving end-side device to determine at least one initial detection task; Receive a priority configuration instruction sent by the end-side device for the at least one initial detection task, and configure priority information for the at least one initial detection task; From the at least one initial detection task, determine at least one detection task corresponding to the updated object to be detected.
3. The method according to claim 2, further comprising: Receive the task execution condition configuration instruction sent by the end-side device for the at least one initial detection task, and configure task execution condition information for the at least one initial detection task.
4. The method according to claim 1, further comprising, before determining the first object to be detected corresponding to the first detection task: Determine the execution space for performing the first detection task; If it is determined that the number of detection tasks executed within the execution space has not reached a preset number threshold, the step of determining the first object to be detected corresponding to the first detection task is executed. Accordingly, the step of obtaining the data corresponding to the first object to be detected using the target data acquisition statement includes: The target data acquisition statement is added to the execution space and executed. The data corresponding to the first object to be detected is obtained based on the execution result.
5. The method according to claim 4, further comprising, after determining the execution space for performing the first detection task: If the number of detection tasks executed within the execution space reaches a preset threshold, the first detection task is added to the queue of tasks to be executed. If any detection task executed within the execution space is determined to be completed, the detection tasks in the queue of tasks to be executed are added to the execution space and executed according to their priority information.
6. The method according to claim 1, wherein determining the target data acquisition statement corresponding to the first object to be detected based on the relevant parameters of the first object to be detected includes: Determine the initial data retrieval statement; Add the relevant parameters of the first object to be detected to the initial data acquisition statement to obtain the target data acquisition statement corresponding to the first object to be detected.
7. The method according to claim 1, further comprising: If it is determined that the first detection task does not meet the task execution conditions based on the first object to be detected, the first detection task is added to the task queue to be executed.
8. The method according to claim 1, wherein determining the first object to be detected corresponding to the first detection task includes: If the timestamp corresponding to the object to be detected is updated, then the object to be detected is updated. or Upon receiving a data update notification for the object to be detected, it is determined that the object to be detected has been updated; Identify the first object to be detected corresponding to the first detection task.
9. An object processing method, applied to an edge device, comprising: If a touch operation is detected on the display interface and it is determined that the touch operation triggers a data detection request, the task configuration interface is displayed on the display interface. Detect touch operations on the first control in the task configuration interface, determine the corresponding task configuration information, and generate at least one initial detection task, wherein the first control is any one of at least one control on the task configuration interface; Receive data detection results obtained based on the at least one initial detection task, and display the data detection results through the display interface, wherein the data detection results are data detection results obtained by performing the method of any one of claims 1-8.
10. The method according to claim 9, wherein the control comprises an input control and a selection control; Accordingly, the detection targets the touch operation of the first control in the task configuration interface, determines the corresponding task configuration information, and generates at least one initial detection task, including: Detect input operations and / or touch operations on the input controls and / or selection controls in the task configuration interface, and determine the corresponding task information, priority information and task execution condition information corresponding to the task information; Based on the task information, as well as the priority information and task execution condition information corresponding to the task information, at least one initial detection task is generated.
11. An object processing system, comprising an object detection unit and a data storage unit, wherein, The object detection unit is used to perform the method described in any one of claims 1-8, and the data storage unit is used to store the object to be detected and the data corresponding to the object to be detected.
12. A method for detecting commodity data, comprising: Determine the first indicator to be detected corresponding to the first detection task, wherein the first indicator to be detected is the indicator to be detected for the target product; Determine whether the number of detection tasks executed within the execution space of the first detection task reaches a preset number threshold; if not, determine whether the first indicator to be detected meets the task execution conditions of the first detection task. If it is determined that the first indicator to be detected meets the task execution conditions of the first detection task, the relevant parameters of the first indicator to be detected are determined. The task execution conditions include that the partition of the first indicator to be detected exists at time t and the partition at time t-1, or that the partition of the first indicator to be detected exists in both data table a and data table b. Based on the relevant parameters of the first indicator to be detected, determine the target data acquisition statement corresponding to the first indicator to be detected; The target data acquisition statement is used to obtain the data corresponding to the first indicator to be detected, and the data corresponding to the first indicator to be detected is detected to obtain the data detection result.
13. A computing device, comprising: Memory and processor; The memory is used to store computer-executable instructions, and the processor is used to execute the computer-executable instructions, which, when executed by the processor, implement the steps of the method according to any one of claims 1 to 10 or 12.