Process determination method and device and storage medium
By determining the order of the filter in the filter process based on the judgment speed, the problem of low filter efficiency when combining multiple filters is solved, and a faster data filtering process is achieved.
Patent Information
- Application Number
- CN202311084535.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-08-25
- Publication Date
- 2025-02-25
AI Technical Summary
During the data filtering process, there may be a problem of low filter efficiency when using multiple filters, especially due to the lack of planning of the sorting method between the filters, resulting in an increase in filtering time.
By obtaining the filtering parameters for each filter, the filtering process is determined based on these parameters. The filter parameters reflect the judgment speed of the filter. When sorting, filters with faster judgment speed are ranked first, thereby optimizing the filtering process.
By optimizing the sorting order of filters, the efficiency of data filtering is improved, the filtering time is reduced, and the overall processing speed is improved.
Smart Images

Figure CN119513378A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer technology, and in particular to a process determination method, a file sending method, a device, a system and a storage medium. Background Art
[0002] In actual scenarios, there are situations where data is processed through multiple similar processing links. For example, in the field of data filtering, data can be filtered through multiple filters to obtain filtering results. Among them, the filter is used to determine whether the filtered data meets the filtering conditions, and the filtering conditions corresponding to different filters can be different. In this way, through the combination of multiple filters, it can be determined whether a certain data meets multiple conditions.
[0003] However, when multiple filters are used to filter data, there may be a problem of low filtering efficiency. Summary of the invention
[0004] In order to solve the problems of the prior art, the present application provides a process determination method, a file sending method, a device, a system and a storage medium.
[0005] In a first aspect, the present application provides a process determination method, the method comprising:
[0006] Acquire a filter parameter of each filter among a plurality of filters, wherein the filter is used to judge resource data, and the filter parameter is determined according to a speed at which the filter judges;
[0007] A filtering process is determined according to the filtering parameters of the filter, and the filtering process includes the multiple filters arranged in a target order.
[0008] In some possible implementations, the plurality of filters include a target filter, and the method further includes:
[0009] Get target resource data;
[0010] Judging the target resource data according to the filtering process, and determining the judgment result of the target resource data;
[0011] adjusting the filtering parameters of the target filter according to the time consumed by the target filter to judge the target resource data;
[0012] The target order is adjusted according to the adjusted filtering parameters of the target filter.
[0013] In some possible implementations, the faster the filter makes a judgment, the larger the filtering parameter is; and determining the filtering process according to the filtering parameter of the filter includes:
[0014] The plurality of filters are sorted in descending order according to the filtering parameters to obtain the filtering process.
[0015] In some possible implementations, determining the filtering process according to the filtering parameters of the filter includes:
[0016] Acquire an interaction type of each of the filters, where the interaction types of the filters include a first type and a second type, where the filters of the first type have information interaction during operation, and the filters of the second type do not have information interaction during operation;
[0017] The filtering process is determined according to the interaction type of the filter and the filtering parameters of the filter.
[0018] In some possible implementations, determining the filtering process according to the interaction type of the filter and the filtering parameter of the filter includes:
[0019] The second type of filters are arranged in series in the order of the size of the filter parameters.
[0020] In some possible implementations, determining the filtering process according to the interaction type of the filter and the filtering parameter of the filter includes:
[0021] Arrange in parallel a plurality of filters having the same filtering parameters and being of the second type.
[0022] In some possible implementations, determining the filtering process according to the interaction type of the filter and the filtering parameter of the filter includes:
[0023] Two filters having the same filtering parameters and belonging to the first type and the second type respectively are arranged in series, with the filter of the first type following the filter of the second type.
[0024] In the second aspect, the present application provides a process determination device, which includes: an acquisition unit, used to obtain the filtering parameters of each filter among multiple filters, the filters are used to judge resource data, and the filtering parameters are determined according to the speed at which the filters make judgments; a determination unit, used to determine the filtering process according to the filtering parameters of the filters, and the filtering process includes the multiple filters arranged in a target order.
[0025] In some possible implementations, the multiple filters include a target filter. The acquisition unit is specifically used to acquire target resource data; the determination unit is specifically used to judge the target resource data according to the filtering process and determine the judgment result of the target resource data; according to the time consumed by the target filter to judge the target resource data, adjust the filtering parameters of the target filter; according to the adjusted filtering parameters of the target filter, adjust the target order.
[0026] In some possible implementations, the faster the filter makes a judgment, the larger the filtering parameter is; the determination unit is specifically used to sort the multiple filters in descending order according to the filtering parameters to obtain the filtering process.
[0027] In some possible implementations, the determination unit is specifically used to obtain the interaction type of each of the filters, the interaction types of the filters including a first type and a second type, the first type of filters having information interaction during operation, and the second type of filters having no information interaction during operation; the filtering process is determined according to the interaction type of the filter and the filtering parameters of the filter.
[0028] In some possible implementations, the determining unit is specifically configured to arrange the second type of filters in series in the order of the size of the filter parameters.
[0029] In some possible implementations, the determining unit is specifically configured to arrange in parallel a plurality of filters that have the same filtering parameters and are all of the second type.
[0030] In some possible implementations, the determining unit is specifically configured to:
[0031] Two filters having the same filtering parameters and belonging to the first type and the second type respectively are arranged in series, with the filter of the first type being after the filter of the second type.
[0032] In a third aspect, the present application provides an electronic device, including:
[0033] one or more processors;
[0034] a storage device having one or more programs stored thereon,
[0035] When the one or more programs are executed by the one or more processors, the one or more processors implement any method described in the first aspect.
[0036] In a fourth aspect, the present application provides a computer-readable medium having a computer program stored thereon, wherein when the program is executed by a processor, any method described in the first aspect is implemented.
[0037] In a fifth aspect, the present application provides a computer program product, which, when executed on a device, enables the device to execute the method described in the first aspect.
[0038] The present application provides a process determination method, device, system and storage medium, which can determine the use process of multiple filters. Specifically, when it is necessary to judge resource data through multiple filters, the filtering parameters of each filter can be obtained first. The filtering parameters of the filter are used to indicate the filtering speed of the filter on the data, that is, the speed of judging the resource data. Then, the filtering process can be determined according to the filtering parameters of the filter. The filtering process includes multiple filters arranged in a target order. The target order is obtained according to the filtering parameters of the filter. In other words, in a scenario where it is necessary to judge resource data through multiple filters, the arrangement order between the filters is not random or obtained according to the creation time of the filter, but is determined according to the speed of the filter to judge. In this way, the filter with a faster judgment speed can be arranged before the filter with a slower judgment speed, so as to filter the resource data in advance. Accordingly, the judgment result of the resource data can be obtained more quickly. In this way, sorting the filters according to the speed of the filter can improve the filtering efficiency. BRIEF DESCRIPTION OF THE DRAWINGS
[0039] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments recorded in the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0040] Figure 1 A flowchart of a process determination method provided in an embodiment of the present application;
[0041] Figure 2 Another schematic diagram of a process flow of a process determination method provided in an embodiment of the present application;
[0042] Figure 3 A schematic diagram of a process determination device provided in an embodiment of the present application;
[0043] Figure 4 A schematic diagram of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0044] The embodiments of the present application will be described in more detail below with reference to the accompanying drawings. Although certain embodiments of the present application are shown in the accompanying drawings, it should be understood that the present application can be implemented in various forms and should not be construed as being limited to the embodiments described herein. Instead, these embodiments are provided to provide a more thorough and complete understanding of the present application. It should be understood that the drawings and embodiments of the present application are only for exemplary purposes and are not intended to limit the scope of protection of the present application.
[0045] It should be understood that the various steps described in the method implementation of the present application can be performed in different orders and / or performed in parallel. In addition, the method implementation may include additional steps and / or omit the steps shown. The scope of the present application is not limited in this respect.
[0046] The term "including" and its variations used herein are open inclusions, i.e., "including but not limited to". The term "based on" means "based at least in part on". The term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one additional embodiment"; the term "some embodiments" means "at least some embodiments". The relevant definitions of other terms will be given in the following description.
[0047] It should be noted that the concepts such as "first" and "second" mentioned in this application are only used to distinguish different objects, devices, modules or units, and are not used to limit the order or interdependence of the functions performed by these devices, modules or units.
[0048] It should be noted that the modifications of "one" and "plurality" mentioned in the present application are illustrative rather than restrictive, and those skilled in the art should understand that unless otherwise clearly indicated in the context, it should be understood as "one or more".
[0049] A data filter (referred to as a filter) is a data processing logic that can be implemented in the form of software or code. A filter can be used to filter data. Among them, "filtering data" or "data filtering" refers to determining whether the data meets the preset conditions. If the data meets the preset conditions, it can be considered that the data passes the filter. If the data does not meet the preset conditions, it can be considered that the data does not pass the filter. The above preset conditions are the relevant parameters of the filter.
[0050] In some application scenarios, multiple filters may be required to filter data. If all filters filter the data and the results obtained indicate that the data passes, then it can be considered that the data has passed the filtering of the filters and the data can be used for subsequent operations.
[0051] For example, in some possible scenarios, filters can be used to determine the resource data provided to the user. Specifically, after obtaining the resource data acquisition request sent by the client, multiple alternative resource data can be determined. Then, each resource data can be filtered by multiple filters respectively. If there is resource data that passes the filtering of all filters, then these resource data can be sent to the client so that the client can display the resource data to the user. Alternatively, if a certain resource data cannot pass the filtering of a certain filter, it can be determined that the resource data does not meet the conditions for sending to the client.
[0052] In actual scenarios, multiple filters can be connected in series. In addition, the results of multiple filters are in an "and" relationship. That is, only when all filters determine that the data meets the conditions, the data is determined to have passed the filtering. If any filter determines that the data does not meet the conditions, it can be determined that the data has not passed the filtering.
[0053] Therefore, if data can pass through filters that are ranked earlier but cannot pass through filters that are ranked later, filtering the data may take a long time.
[0054] Currently, the order between filters is mostly the order in which technicians create the filters. Therefore, when filtering data through multiple filters, the lack of planning for the ordering of filters may consume time and reduce the efficiency of filtering data by the filters.
[0055] For example, suppose that data is filtered in sequence through filter A1, filter A2, and filter A3. And data D1 can pass through filter A1 and filter A2, but cannot pass through filter A3. Then the time consumed to filter data D1 in sequence is greater than the time consumed to filter data D1 through filter A3 first.
[0056] Furthermore, in a scenario where multiple data are filtered, assuming that the probability of data passing through different filters is the same, if the time consumed by filter A3 to filter the data is shorter than the time consumed by filter A2 to filter the data and the time consumed by filter A1 to filter the data, then deploying filter A3 as the last one may consume more time.
[0057] In order to solve the problems of the prior art, an embodiment of the present application provides a process determination method, which is described in detail below in conjunction with the drawings in the specification.
[0058] See also Figure 1 , Figure 1An information interaction diagram of a process determination method provided in an embodiment of the present application, the embodiment of the present application can be applied to an application scenario in which data is filtered through multiple filters. The process determination method can be executed by a process determination device. The process determination device can be implemented by software. Optionally, the device may include a relevant module or device for executing the filter, or the device may be associated with a relevant module or device for executing the filter.
[0059] Optionally, the process determination device can be integrated into the server side of the software. The server side can be used to provide corresponding services for the client side of the software. Optionally, the process determination device can be integrated into a module on the server side for determining the filtering process, or integrated into a module on the server side for filtering resource data. For ease of introduction, the following description is based on the example of the process determination device being integrated into the server side.
[0060] like Figure 1 As shown, the method specifically comprises the following steps:
[0061] S101: Obtain filtering parameters of each filter in a plurality of filters.
[0062] In order to determine a suitable filtering process, the process determination device may first obtain the filtering parameters of each filter in the plurality of filters. The plurality of filters refers to the filters in the filtering process to be determined. In other words, in order to determine the arrangement order of the filters in the filtering process, the filtering parameters of each filter in the filtering process may be obtained first, so as to sort the filters according to the filtering parameters.
[0063] In the embodiment of the present application, the filtering parameters are determined according to the speed at which the filter makes judgments. The filter makes judgments, which refers to the process of filtering data during operation. The speed at which the filter makes judgments can reflect the speed at which the filter filters data.
[0064] Optionally, the filtering parameters of the filter can be determined based on the time consumed by the filter in the data filtering process. The shorter the time consumed by the filter in the data filtering process, the faster the filter filters the data. Accordingly, when determining the filtering parameters of the filter, the time consumed by the filter in the data filtering process can be obtained, and then the filtering parameters of the filter can be determined based on the time consumed by the filter in the data filtering process. Optionally, the time consumed in the data filtering process can be called response time.
[0065] In some possible implementations, the time consumed by the filter in the data filtering process may be determined as a filtering parameter of the filter.
[0066] Alternatively, in some other possible implementations, the filter parameter of the filter can be determined according to the size of the filtered data and the time consumed in the data filtering process. Specifically, the size of the filtered data can be divided by the time consumed in the data filtering process. The obtained quotient can be used as the filter parameter of the filter. Accordingly, the larger the filter parameter, the larger the amount of data filtered by the filter per unit time, and the faster the filter filters the data.
[0067] Alternatively, in some other possible implementations, the filtering parameters of the filter can be determined based on the time range to which the time consumed by the filter in filtering data belongs. Specifically, multiple time ranges can be pre-set. Different time ranges are complementary and overlapping, and correspond to different filtering parameters. When determining the filtering parameters of the filter, the time consumed by the filter in filtering data can be obtained, and then it can be determined which time range the time corresponds to, so as to determine the filtering parameters corresponding to the filter based on the filtering parameters corresponding to the time range. In this way, the filtering parameters of filters that consume similar time in the data filtering process may be the same, which is convenient for subsequent determination of the filtering process. In particular, the filtering parameters of filters with similar response times are the same, which facilitates the parallel deployment of filters. For an introduction to the parallel deployment of filters, please refer to the following text, which will not be repeated here.
[0068] In the embodiment of the present application, the filtering parameters corresponding to the filter can be pre-set by a technician. Specifically, when configuring the filter, the technician can evaluate the complexity of the filter and predict the speed at which the filter makes a judgment to determine the filtering parameters of the filter.
[0069] In some other possible implementations, the filter parameters may also be determined according to the actual situation of the filter filtering data. For an introduction to this implementation, see below Figure 2 The introduction of the corresponding embodiment will not be repeated here.
[0070] S102: Determine the filtering process according to the filtering parameters of the filter.
[0071] After determining the filtering parameters of each filter in the filtering process, the process determination device can determine the filtering process according to the filtering parameters of the filter. Wherein, the filtering process includes multiple filters arranged in a target order. That is, the process determination device can determine the target order according to the filtering parameters of the filter.
[0072] According to the previous introduction, the filter parameters of the filter can be determined according to the speed at which the filter makes judgments. Therefore, when determining the filtering process, the filter with a faster judgment speed can be deployed in the front, and the filter with a slower judgment speed can be deployed in the back. That is, among the multiple filters arranged in the target order, the front filter makes judgments faster than the back filter. Accordingly, when using the filtering process to filter data, the resource data is first filtered by the filter with a faster judgment speed. If the filter passes, the resource data is filtered by the filter with a slower judgment speed.
[0073] In actual scenarios, the probability of data passing through different filters may be close. Then, deploying a filter with a faster judgment speed before a filter with a slower judgment speed can improve the efficiency of filtering data.
[0074] Specifically, it is assumed that the probability of filtering out data by different filters is the same, that is, the probability of data being filtered out by a filter with a faster judgment speed is the same as the probability of data being filtered out by a filter with a faster judgment speed. In other words, for the first filter in the filtering process, the filtered data is the same. Obviously, for this part of the filtered data, the time consumed by the filter with a fast judgment speed in the data filtering process is shorter than the time consumed by the filter with a slow judgment speed in the data filtering process. Therefore, deploying the filter with a faster judgment speed at the front position in the filtering process can improve the efficiency of filtering data.
[0075] Let's take an example. Assume that there are three filters, filter A1, filter A2 and filter A3. It takes 1T for filter A1 to filter data, 2T for filter A2 to filter data, and 3T for filter A3 to filter data. Also, assume that the filtered data includes data D1, data D2, data D3 and data D4. Among them, data D1 cannot pass filter A1, but can pass filter A2 and filter A3; data D2 cannot pass filter A2, but can pass filter A1 and filter A3; data D3 cannot pass filter A3, but can pass filter A1 and filter A2. Data D4 can pass filter A1, filter A2 and filter A3.
[0076] In the first case, the filtering process is "Filter A1→Filter A2→Filter A3", then the time for filtering data D1 is 1T, the time for filtering data D2 is 3T, the time for filtering data D3 is 6T, and the time for filtering data D4 is 6T. The total time is 1+3+6+6=16T.
[0077] In the second case, the filtering process is "Filter A1→Filter A3→Filter A2", then the time for filtering data D1 is 1T, the time for filtering data D2 is 6T, the time for filtering data D3 is 4T, and the time for filtering data D4 is 6T. The total time is 1+6+4+6=17T.
[0078] In the third case, the filtering process is "Filter A2→Filter A1→Filter A3", then the time for filtering data D1 is 3T, the time for filtering data D2 is 2T, the time for filtering data D3 is 6T, and the time for filtering data D4 is 6T. The total time is 3+2+6+6=17T.
[0079] In the fourth case, the filtering process is "Filter A2→Filter A3→Filter A1", then the time for filtering data D1 is 6T, the time for filtering data D2 is 2T, the time for filtering data D3 is 5T, and the time for filtering data D4 is 6T. The total time is 6+2+5+6=19T.
[0080] In the fifth case, the filtering process is "Filter A3→Filter A1→Filter A2", then the time for filtering data D1 is 4T, the time for filtering data D2 is 6T, the time for filtering data D3 is 3T, and the time for filtering data D4 is 6T. The total time is 4+6+3+6=19T.
[0081] In the sixth case, the filtering process is "Filter A3→Filter A2→Filter A1", so the time for filtering data D1 is 6T, the time for filtering data D2 is 5T, the time for filtering data D3 is 3T, and the time for filtering data D4 is 6T. The total time is 6+5+3+6=20T.
[0082] It can be seen that among the above six situations, the situation in which the response time is arranged in ascending order (i.e., the first situation) takes the least time. Since the data that cannot pass the filter can be filtered out at the fastest speed, the efficiency of the filter in filtering data is improved.
[0083] In some possible implementations, in order to further improve filtering efficiency, filters may be classified, and the order of filters in the filtering process may be determined according to filter types and filtering parameters.
[0084] In some implementations, some (or all) filters may have information interactions with other modules during the data filtering process. For example, when filtering data, the filter may need to query information related to the data from other systems, and then filter the data based on the information. In the above process, the information interaction process may require a long waiting time. Moreover, with the fluctuation of the network, the waiting time of the information interaction process may also increase accordingly.
[0085] Therefore, the time that filters that require information interaction may consume in filtering data may change. Compared with filters that do not require information interaction, the time that filters that require information interaction consume in the data filtering process may increase with network fluctuations. According to the reasoning in the previous article, deploying filters with shorter response times at the front of the filtering process can improve the efficiency of filtering data. Therefore, since the number of filters that require information interaction may increase during the data filtering process, under the same filtering parameters, filters that require information interaction can be deployed later.
[0086] Specifically, the process determination device can first obtain the interaction type of each filter, and then determine the filtering process according to the interaction type of the filter and the filtering parameters. The interaction type of the filter is used to indicate whether the filter performs information interaction when filtering data. The interaction type of the filter can be manually marked by the technician who created the filter, or it can be determined by analyzing the code corresponding to the filter.
[0087] If a filter needs to exchange information with other systems or modules during the process of filtering data, the filter can be called a first type filter. If a filter does not need to exchange information with other systems or modules during the process of filtering data, the filter can be called a second type filter.
[0088] Optionally, since the first type of filter relies on information interaction to filter data, the speed of filtering data mainly depends on the speed of information interaction, and therefore, the first type of filter can be called an input / output (IO) intensive filter. Similarly, since the second type of filter does not rely on information interaction to filter data, the speed of filtering data mainly depends on the speed of the processor processing data, and therefore, the second type of filter can be called a central processing unit (CPU) intensive filter.
[0089] For the second type of filters, since the filters mainly consume CPU resource data during operation, the second type of filters can be deployed in series, and the order of the second type of filters being deployed in series is determined according to the filter parameters of the second type of filters. If there are two second type filters with the same filter parameters, the order of the two filters can be determined according to the order of the filters, or the order of the two filters can be determined according to other factors.
[0090] Since there is information interaction during the data filtering process of the first type of filter, the time consumed by the first type of filter during the data filtering process may fluctuate. Therefore, if there is a second type of filter with the same filtering parameters as a first type of filter, the first type of filter can be deployed later because the time consumed by the first type of filter during the data filtering process may increase.
[0091] That is to say, assuming that the filtering parameters of filter B1 and filter B2 are the same, and filter B1 is a first type of filter, and filter B2 is a second type of filter. Then when determining the filtering process, filter B2 can be deployed before filter B1. In this way, even if the time consumed by filter B2 to filter data increases during the data filtering process due to network fluctuations and other reasons, since filter B2 is deployed after filter B1, the efficiency of filtering data will not be significantly reduced.
[0092] At present, most filters in the filtering process are deployed in series. That is, data can only be filtered by the next filter after passing through one filter. When a filter is filtering data, other filters cannot filter the data. In this way, although it is guaranteed that each filter can filter the data, there is also the problem of low filtering efficiency.
[0093] To this end, in some possible implementations, filters may be deployed in parallel, so that multiple filters deployed in parallel can filter data at the same time, thereby improving the efficiency of data filtering.
[0094] Specifically, multiple filters with the same filtering parameters and belonging to the first type can be deployed in parallel. In this way, when filtering data, the filters deployed in parallel can filter the data at the same time to improve the efficiency of data filtering.
[0095] For the first type of filters, the time consumed in the data filtering process is mainly the time for waiting for information interaction. Therefore, multiple first type filters are run in parallel so that these filters can interact with information in the same time period. In this way, the processes of multiple information interactions are concentrated in the same time period, which saves the time of information interaction and improves the efficiency of data filtering.
[0096] Furthermore, since the filters deployed in parallel are filters of the first type, the main factor limiting the speed of the filter's judgment is the waiting time for information interaction, and the demand for data processing resources is relatively small. Therefore, multiple filters running in parallel consume less data processing resources, and the efficiency of data filtering will not be affected by the limited amount of data processing resources.
[0097] The present application provides a process determination method, which can determine the use process of multiple filters. Specifically, when it is necessary to judge resource data through multiple filters, the filtering parameters of each filter can be obtained first. The filtering parameters of the filter are used to indicate the filtering speed of the filter on the data, that is, the speed of judging the resource data. Then, the filtering process can be determined according to the filtering parameters of the filter. The filtering process includes multiple filters arranged in a target order. The target order is obtained according to the filtering parameters of the filter. In other words, in a scenario where it is necessary to judge resource data through multiple filters, the arrangement order between the filters is not random or obtained according to the creation time of the filter, but is determined according to the speed of the filter to judge. In this way, the filter with a faster judgment speed can be arranged before the filter with a slower judgment speed, so as to filter the resource data in advance. Accordingly, the judgment result of the resource data can be obtained faster. In this way, sorting the filters according to the speed of the filter can improve the filtering efficiency.
[0098] In the implementation described above, the filtering process can be determined according to the filtering parameters. The filtering parameters are determined according to the speed at which the filter makes judgments. In actual scenarios, the speed at which the filter makes judgments may change. As the speed at which the filter makes judgments changes, the efficiency of the original filtering process for data filtering may be low.
[0099] To this end, in some possible implementations, the filter parameters of the filter can be adjusted according to the response time of the filter during the data filtering process.
[0100] See also Figure 2 , Figure 2 An information interaction diagram of a process determination method provided in an embodiment of the present application, the embodiment of the present application can be applied to an application scenario in which data is filtered through multiple filters. The process determination method can be executed by a process determination device. The process determination device can be implemented by software.
[0101] Optionally, the process determination device can be integrated into the server side of the software. The server side can be used to provide corresponding services for the client side of the software. Optionally, the process determination device can be integrated into a module on the server side for determining the filtering process, or integrated into a module on the server side for filtering resource data. Optionally, the device can include relevant modules or devices for executing filters.
[0102] For ease of introduction, the following description is made by taking an example in which the process determination device is integrated in the server and includes a device for executing a filter.
[0103] like Figure 2 As shown, the method specifically comprises the following steps:
[0104] S201: Obtain filtering parameters of each filter in a plurality of filters.
[0105] S202: Determine a filtering process according to filtering parameters of the filter.
[0106] For the introduction of step S201 and step S203, please refer to the above and will not be repeated here.
[0107] S203: Filter the target data according to the filtering process.
[0108] After the filtering process is determined, the target data can be filtered according to the filtering process. Optionally, if a module for filtering data is integrated in the process determination device, the process determination device can filter the target data according to the filtering process. Alternatively, if a module for filtering data is not integrated in the process determination device, the process determination device can send the filtering process to the data filtering device so that the process filtering device can filter the target data.
[0109] Optionally, the target data may be target resource data. The target resource data belongs to resource data. Resource data is used to indicate the content displayed by the client to the user. The client may display the content corresponding to the resource data to the user based on the resource data. Accordingly, multiple target resource data may be pre-set, and the multiple target resource data may be filtered through a filtering process, and the target resource data to be sent to the client may be selected from the multiple target resource data and sent to the client, so that the client may display the filtered related content to the user.
[0110] Optionally, in the above application scenario, the filter can filter according to the user's relevant information. For example, the data acquisition request can include the performance data of the client, and a filter in the filtering process can filter out resource data with high performance requirements based on the performance data of the server. For another example, the data acquisition request can include the identifier of the page currently visited by the client, and another filter in the filtering process can filter out resource data that does not match the page based on the identifier of the page currently visited by the client. The specific details of filtering the target resource data according to the filtering process will not be repeated.
[0111] In some possible implementations, the client of the software may include one or more resource display positions. When it is necessary to display content to the user, the client may send a resource data acquisition request to the server. The server may determine a filtering process based on the resource acquisition request, and filter multiple preset target resource data through the filtering process. Then, the server may send the filtered one or more target resource data to the client. The client may display one or more target resource data in the resource display.
[0112] S204: Obtain response time of one or more filters.
[0113] In the process of filtering the target data through the filtering process, the response time of one or more filters in the filtering process can be obtained. The response time of the filter refers to the time consumed by the filter to filter the target data, that is, the time interval from when the filter starts filtering the target data to when the filter obtains the filtering result corresponding to the target data.
[0114] As described above, if a filter in the filtering process determines that the target data does not meet the conditions, then other filters after the filter do not need to filter the target data. In this way, the working time of some filters in the filtering process when filtering the target data may be zero. In this way, if the working time of the filter that does not filter the target data is determined as the response time of the filter, the filtering parameters adjusted according to the response time may be inaccurate.
[0115] In order to improve the accuracy of the filtering parameters, in the embodiment of the present application, the filter that filters the target data and the filter that does not filter the target data can be distinguished. Specifically, when obtaining the response time of the filter, only the response time of the filter that filters the target data can be obtained.
[0116] In some possible implementations, multiple data may be filtered at once. Accordingly, if the filter filters multiple target data, the response time of the filter may be the average of the time consumed by the filter in the data filtering process.
[0117] S205: Adjust filtering parameters of the filter according to the response time of the filter.
[0118] After obtaining the response time of the filter, you can adjust the filter parameters according to the filter response time. For an introduction to determining the filter parameters based on the filter response time, see Figure 1 The introduction of the corresponding embodiment will not be repeated here.
[0119] According to the above introduction, some filters in the filtering process may not filter the data, and the response time of these filters is not obtained. For filters that do not correspond to the response time, the filtering parameters do not need to be adjusted.
[0120] S206: Adjust the filtering process according to the adjusted filtering parameters.
[0121] After adjusting the filter parameters of the filter, the filtering process can be adjusted according to the adjusted filtering parameters. Specifically, in the introduction of step S102 above, the target order can be determined according to the filtering parameters of the filter, and the filtering process can be determined according to the target order. After the filtering parameters of the filter are adjusted, the second order can be determined according to the adjusted filtering parameters, and the filtering process can be determined according to the second order. For an introduction to determining the filtering process according to the filtering parameters, please refer to Figure 1 The introduction of the corresponding embodiment will not be repeated here.
[0122] After adjusting the filtering process, other data can be filtered, and the filtering parameters and filtering process can be adjusted again according to the response time of the filter. Optionally, after filtering the data through the filtering process each time, the response time of the filter can be obtained, and the order of the filters in the filtering process can be adjusted according to the response time. In this way, as the filtering process runs, the order of the filters in the filtering process can be continuously optimized, thereby improving the filtering efficiency of the filtering process.
[0123] Based on a process determination method provided in the above method embodiment, the embodiment of the present application also provides a process determination device, which will be described below in conjunction with the accompanying drawings.
[0124] See also Figure 3 As shown in FIG. 1 , this figure is a schematic diagram of the structure of a process determination device provided in an embodiment of the present application. Figure 3 As shown, the process determination device 300 includes:
[0125] An acquisition unit 310, configured to acquire a filter parameter of each filter among a plurality of filters, wherein the filter is used to judge resource data, and the filter parameter is determined according to a speed at which the filter judges;
[0126] The determination unit 320 is configured to determine a filtering process according to the filtering parameters of the filter, wherein the filtering process includes the multiple filters arranged in a target order.
[0127] In some possible implementations, the multiple filters include a target filter. The acquisition unit 310 is specifically used to acquire target resource data; the determination unit 320 is specifically used to judge the target resource data according to the filtering process and determine the judgment result of the target resource data; according to the time consumed by the target filter to judge the target resource data, adjust the filtering parameters of the target filter; according to the adjusted filtering parameters of the target filter, adjust the target order.
[0128] In some possible implementations, the faster the filter makes a judgment, the larger the filtering parameter is; the determination unit 320 is specifically used to sort the multiple filters in descending order according to the filtering parameters to obtain the filtering process.
[0129] In some possible implementations, the determination unit 320 is specifically used to obtain the interaction type of each of the filters, the interaction types of the filters including a first type and a second type, the first type of filters having information interaction during operation, and the second type of filters having no information interaction during operation; the filtering process is determined according to the interaction type of the filter and the filtering parameters of the filter.
[0130] In some possible implementations, the determining unit 320 is specifically configured to arrange the second type of filters in series in the order of the size of the filter parameters.
[0131] In some possible implementations, the determining unit 320 is specifically configured to arrange in parallel a plurality of filters that have the same filtering parameters and are all of the second type.
[0132] In some possible implementations, the determining unit 320 is specifically configured to arrange in series the two filters having the same filtering parameters and belonging to the first type and the second type respectively, with the filter of the first type being after the filter of the second type.
[0133] Based on a process determination method provided in the above method embodiment, the present application also provides an electronic device, including: one or more processors; a storage device, on which one or more programs are stored, when the one or more programs are executed by the one or more processors, the one or more processors implement the process determination method as described in any of the above embodiments.
[0134] Reference below Figure 4 , which shows a schematic diagram of the structure of an electronic device 400 suitable for implementing the embodiment of the present application. The terminal device in the embodiment of the present application may include but is not limited to mobile terminals such as mobile phones, laptop computers, digital broadcast receivers, PDAs (Personal Digital Assistants), PADs (portable android devices), PMPs (Portable Media Players), vehicle-mounted terminals (such as vehicle-mounted navigation terminals), etc., and fixed terminals such as digital TVs (televisions), desktop computers, etc. Figure 4 The electronic device shown is merely an example and should not bring any limitation to the functions and scope of use of the embodiments of the present application.
[0135] like Figure 4 As shown, the electronic device 400 may include a processing device (e.g., a central processing unit, a graphics processing unit, etc.) 401, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 402 or a program loaded from a storage device 408 into a random access memory (RAM) 403. In the RAM 403, various programs and data required for the operation of the electronic device 400 are also stored. The processing device 401, the ROM 402, and the RAM 403 are connected to each other via a bus 404. An input / output (I / O) interface 405 is also connected to the bus 404.
[0136] Typically, the following devices may be connected to the I / O interface 405: input devices 408 including, for example, a touch screen, a touch pad, a keyboard, a mouse, a camera, a microphone, an accelerometer, a gyroscope, etc.; output devices 407 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; storage devices 408 including, for example, a magnetic tape, a hard disk, etc.; and communication devices 409. The communication devices 409 may allow the electronic device 400 to communicate with other devices wirelessly or by wire to exchange data. Although Figure 4 The electronic device 400 is shown with various devices, but it should be understood that it is not required to implement or possess all the devices shown. More or fewer devices may be implemented or possessed instead.
[0137] In particular, according to an embodiment of the present application, the process described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present application includes a computer program product, which includes a computer program carried on a non-transitory computer-readable medium, and the computer program includes a program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from the network through the communication device 409, or installed from the storage device 408, or installed from the ROM402. When the computer program is executed by the processing device 401, the above-mentioned functions defined in the method of the embodiment of the present application are executed.
[0138] The electronic device provided in the embodiment of the present application and the process determination method provided in the above embodiment belong to the same inventive concept. The technical details not fully described in this embodiment can be referred to the above embodiment, and this embodiment has the same beneficial effects as the above embodiment.
[0139] Based on a process determination method provided in the above method embodiment, an embodiment of the present application provides a computer storage medium on which a computer program is stored, wherein when the program is executed by a processor, the process determination method as described in any of the above embodiments is implemented.
[0140] It should be noted that the computer-readable medium mentioned above in the present application may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present application, a computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution system, device or device. In the present application, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, which carries a computer-readable program code. This propagated data signal may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. The computer readable signal medium may also be any computer readable medium other than a computer readable storage medium, which may send, propagate or transmit a program for use by or in conjunction with an instruction execution system, apparatus or device. The program code contained on the computer readable medium may be transmitted using any suitable medium, including but not limited to: wires, optical cables, RF (radio frequency), etc., or any suitable combination of the above.
[0141] In some embodiments, the client and the server may communicate using any currently known or future developed network protocol such as HTTP (Hyper Text Transfer Protocol), and may be interconnected with any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include a local area network ("LAN"), a wide area network ("WAN"), an internet (e.g., the Internet), and a peer-to-peer network (e.g., an ad hoc peer-to-peer network), as well as any currently known or future developed network.
[0142] The computer-readable medium may be included in the electronic device, or may exist independently without being incorporated into the electronic device.
[0143] The computer-readable medium carries one or more programs. When the one or more programs are executed by the electronic device, the electronic device executes the process determination method.
[0144] Computer program code for performing the operations of the present application may be written in one or more programming languages or a combination thereof, including, but not limited to, object-oriented programming languages, such as Java, Smalltalk, C++, and conventional procedural programming languages, such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving a remote computer, the remote computer may be connected to the user's computer via any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0145] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present application. In this regard, each square box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two square boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0146] The units involved in the embodiments described in this application may be implemented by software or hardware. The name of a unit / module does not limit the unit itself in some cases. For example, a voice data acquisition module may also be described as a "data acquisition module".
[0147] The functions described above herein may be performed at least in part by one or more hardware logic components. For example, without limitation, exemplary types of hardware logic components that may be used include: field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), complex programmable logic devices (CPLDs), and the like.
[0148] In the context of the present application, a machine-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, device, or equipment. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or equipment, or any suitable combination of the foregoing. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0149] It should be noted that the various embodiments in this specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments, and the same or similar parts between the various embodiments can be referred to each other. For the system or device disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant parts can be referred to the method part description.
[0150] It should be understood that in the present application, "at least one (item)" means one or more, and "plurality" means two or more. "And / or" is used to describe the association relationship of associated objects, indicating that three relationships may exist. For example, "A and / or B" can mean: only A exists, only B exists, and A and B exist at the same time, where A and B can be singular or plural. The character " / " generally indicates that the objects associated before and after are in an "or" relationship. "At least one of the following" or similar expressions refers to any combination of these items, including any combination of single or plural items. For example, at least one of a, b or c can mean: a, b, c, "a and b", "a and c", "b and c", or "a and b and c", where a, b, c can be single or multiple.
[0151] It should also be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the presence of other identical elements in the process, method, article or device including the elements.
[0152] The above description of the disclosed embodiments enables those skilled in the art to implement or use the present application. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present application. Therefore, the present application will not be limited to the embodiments shown herein, but will conform to the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. A process determination method, characterized in that: The method comprises: Acquire a filter parameter of each filter among a plurality of filters, wherein the filter is used to judge resource data, and the filter parameter is determined according to a speed at which the filter judges; A filtering process is determined according to the filtering parameters of the filter, and the filtering process includes the multiple filters arranged in a target order.
2. The method according to claim 1, characterized in that The plurality of filters includes a target filter, the method further comprising: Get target resource data; Judging the target resource data according to the filtering process, and determining the judgment result of the target resource data; adjusting the filtering parameters of the target filter according to the time consumed by the target filter to judge the target resource data; The target order is adjusted according to the adjusted filtering parameters of the target filter.
3. The method according to claim 1, characterized in that The faster the filter makes a judgment, the larger the filtering parameter is; and the filtering process is determined according to the filtering parameter of the filter, including: The plurality of filters are sorted in descending order according to the filtering parameters to obtain the filtering process.
4. The method according to claim 1, characterized in that: Determining the filtering process according to the filtering parameters of the filter includes: Acquire an interaction type of each of the filters, where the interaction types of the filters include a first type and a second type, where the filters of the first type have information interaction during operation, and the filters of the second type do not have information interaction during operation; The filtering process is determined according to the interaction type of the filter and the filtering parameters of the filter.
5. The method according to claim 4, characterized in that The determining the filtering process according to the interaction type of the filter and the filtering parameters of the filter includes: The second type of filters are arranged in series in the order of the size of the filter parameters.
6. The method according to claim 4, characterized in that The determining the filtering process according to the interaction type of the filter and the filtering parameters of the filter includes: Arrange in parallel a plurality of filters having the same filtering parameters and being of the second type.
7. The method according to claim 4, characterized in that The determining the filtering process according to the interaction type of the filter and the filtering parameters of the filter includes: Two filters having the same filtering parameters and belonging to the first type and the second type respectively are arranged in series, with the filter of the first type following the filter of the second type.
8. A process determination device, characterized in that: The device comprises: An acquisition unit, used for acquiring a filter parameter of each filter among a plurality of filters, wherein the filter is used for judging resource data, and the filter parameter is determined according to a speed at which the filter judges; A determination unit is used to determine a filtering process according to a filtering parameter of the filter, wherein the filtering process includes the multiple filters arranged in a target order.
9. An electronic device, characterized in that: include: one or more processors; a storage device having one or more programs stored thereon, When the one or more programs are executed by the one or more processors, the one or more processors implement the method according to any one of claims 1 to 7.
10. A computer-readable medium, characterized in that A computer program is stored thereon, wherein when the program is executed by a processor, the method according to any one of claims 1 to 7 is implemented.