Resource matching information generation method, device, equipment and computer-readable medium
By generating resource attributes and detailed information sequences, and combining key attribute information and pattern functions for resource matching processing, the time-consuming problem caused by primary key attributes of different data sources is solved, and the efficiency and reliability of resource matching information generation is improved.
Patent Information
- Application Number
- CN202310527510.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-05-11
- Publication Date
- 2025-08-26
- Estimated Expiration
- 2043-05-11
AI Technical Summary
When generating resource matching information, the prior art faces the problems of long time taking in resource data from different data sources, incomplete coverage of primary key attribute mapping relationship dictionary library, thread competition during multi-thread concurrency, and abnormal service interruption resulting in task data loss.
By generating resource attribute information sequences and resource details sequences, detecting and processing based on preset key attribute information sequences, splitting the resource details sequences into dynamic resource information groups, matching processing is performed using pattern function information and resource inventory table, and processing unmatched or unsuccessfully matched data cycled until the conditions are met, the matching value is updated.
It shortens the generation time of resource matching information, reduces the number of classifications of resource data, improves processing efficiency, and avoids thread competition and data loss.
Smart Images

Figure CN116701445B_ABST
Abstract
Description
Technical Field
[0001] Embodiments of the present disclosure relate to the field of computer technology, and in particular to a method, apparatus, device, and computer-readable medium for generating resource matching information. Background Art
[0002] The resource matching information generation method is a technology for matching large amounts of resource data. Currently, when generating resource matching information, the commonly used method is to call a thread in the thread pool to match the resource data to be matched based on the primary key attribute set in the resource inventory table to obtain the resource matching information.
[0003] However, the inventors have discovered that when using the above method to generate resource matching information, the following technical problems often arise:
[0004] First, if resource data from different data sources has different primary key attributes, it is usually necessary to classify the resource data first, and then perform matching processing on the classified resource data to generate resource matching information, which results in a long time consumption;
[0005] Second, due to the large number of data sources, the existing primary key attribute mapping dictionary library is difficult to cover all data sources. When different primary key attributes with the same semantics cannot be mapped to the same primary key attribute, resource data still needs to be classified to generate resource matching information, which makes the generation of resource matching information time-consuming.
[0006] Third, if a combination of multi-threaded concurrency and double-ended queues is used to execute multiple resource matching tasks, thread contention will occur when the number of tasks is small, resulting in data redundancy.
[0007] Fourth, if the service is abnormally interrupted (for example, the network is disconnected or the database cannot be connected) during the process of generating resource matching information, the task data will be lost when the service is restarted, making it difficult to generate resource matching information in a timely manner after the service is restarted.
[0008] The above information disclosed in this Background section is only for enhancement of understanding of the background of the inventive concept and therefore it may contain information that does not form the prior art that is already known in this country to a person of ordinary skill in the art. Summary of the Invention
[0009] The content of this disclosure is used to briefly introduce concepts that will be described in detail in the detailed description section below. The content of this disclosure is not intended to identify key features or essential features of the claimed technical solution, nor is it intended to limit the scope of the claimed technical solution.
[0010] Some embodiments of the present disclosure provide methods, devices, equipment, and computer-readable media for generating resource matching information to solve one or more of the technical problems mentioned in the above background technology section.
[0011] In a first aspect, some embodiments of the present disclosure provide a method for generating resource matching information, the method comprising: in response to receiving resource matching request information, generating a resource attribute information sequence and a resource detail information sequence based on the resource matching request information and a preset attribute information set to be matched, wherein the resource matching request information comprises a user request identifier; based on a preset key attribute information sequence, detecting and processing the resource attribute information sequence to obtain a resource key attribute information sequence; splitting and processing the resource detail information sequence to obtain a dynamic resource information group set; for each dynamic resource information group in the dynamic resource information group set, performing the following steps: initializing a preset number of matching times value to a preset value, and based on the dynamic resource information group, performing the following first resource information group generation step: in response to determining that the number of matching times value satisfies a number threshold condition, based on a preset number of matching times value, performing a first resource information group generation step; The target key attribute information and the target pattern function information are determined based on the set pattern function information set, the matching number value and the above-mentioned resource key attribute information sequence; based on the above-mentioned target key attribute information and the above-mentioned target pattern function information, the dynamic resource information group and the preset resource list information table are matched to obtain the matched resource information group; in response to determining that the above-mentioned matched resource information group meets the preset attribute value condition, the above-mentioned matched resource information group is split to obtain the first resource information group and the second resource information group; in response to determining that the above-mentioned second resource information group meets the preset attribute null value condition, the matching number value is updated, and based on the updated matching number value, the above-mentioned second resource information group is used as the dynamic resource information group, and the above-mentioned first resource information group generation step is executed again; the above-mentioned user request identifier and the obtained first resource information groups are determined as resource matching information.
[0012] In a second aspect, some embodiments of the present disclosure provide a resource matching information generation device, the device comprising: a generation unit, configured to generate a resource attribute information sequence and a resource detail information sequence based on the resource matching request information and a preset attribute information set to be matched in response to receiving resource matching request information, wherein the resource matching request information includes a user request identifier; a detection and processing unit, configured to perform detection and processing on the resource attribute information sequence based on a preset key attribute information sequence to obtain a resource key attribute information sequence; a splitting and processing unit, configured to perform splitting and processing on the resource detail information sequence to obtain a dynamic resource information group set; an execution unit, configured to perform the following steps for each dynamic resource information group in the dynamic resource information group set: initialize a preset number of matching times to a preset value, and perform the following first resource information group generation step based on the dynamic resource information group: in response to determining a matching The number value satisfies the number threshold condition, and the target key attribute information and the target pattern function information are determined based on the preset pattern function information set, the matching number value and the above-mentioned resource key attribute information sequence; based on the above-mentioned target key attribute information and the above-mentioned target pattern function information, the dynamic resource information group and the preset resource inventory information table are matched to obtain the matched resource information group; in response to determining that the above-mentioned matched resource information group meets the preset attribute value condition, the above-mentioned matched resource information group is split to obtain the first resource information group and the second resource information group; in response to determining that the above-mentioned second resource information group meets the preset attribute null value condition, the matching number value is updated, and based on the updated matching number value, the above-mentioned second resource information group is used as the dynamic resource information group, and the above-mentioned first resource information group generation step is executed again; the determination unit is configured to determine the above-mentioned user request identifier and the obtained first resource information groups as resource matching information.
[0013] In a third aspect, some embodiments of the present disclosure provide an electronic device comprising: one or more processors; a storage device on which one or more programs are stored, and when the one or more programs are executed by one or more processors, the one or more processors implement the method described in any implementation of the first aspect above.
[0014] In a fourth aspect, some embodiments of the present disclosure provide a computer-readable medium having a computer program stored thereon, wherein when the program is executed by a processor, the method described in any implementation of the first aspect is implemented.
[0015] The above-described embodiments of the present disclosure have the following beneficial effects: The resource matching information generation methods of some embodiments of the present disclosure can shorten the time required to generate resource matching information. Specifically, the long time required to generate resource matching information is due to the fact that if resource data from different data sources has different primary key attributes, the resource data typically needs to be classified and then matched separately to generate the resource matching information. Based on this, the resource matching information generation methods of some embodiments of the present disclosure first generate a resource attribute information sequence and a resource detail information sequence based on the resource matching request and a preset set of attribute information to be matched in response to receiving a resource matching request. The resource matching request may include a user request identifier. This generates a resource matching task and determines the normalized attributes and attribute value data corresponding to the resource matching task, facilitating subsequent matching of the attribute value data based on the attributes corresponding to the resource matching task. Secondly, based on a preset key attribute information sequence, the resource attribute information sequence is detected to obtain a resource key attribute information sequence. This determines the key attributes among the attributes corresponding to the resource matching task. The resource detail information sequence is then split to obtain a dynamic resource information set. Thus, the resource matching task can be split into various sub-matching tasks, so that each subsequent sub-matching task performs matching processing on a corresponding dynamic resource information group. Subsequently, for each dynamic resource information group in the dynamic resource information group set, the following steps are performed: a preset matching count value is initialized to a preset value; and based on the dynamic resource information group, the following first resource information group generation step is performed: in response to determining that the matching count value satisfies a count threshold condition, target key attribute information and target pattern function information are determined based on a preset pattern function information set, the matching count value, and the resource key attribute information sequence; based on the target key attribute information and the target pattern function information, the dynamic resource information group is matched with a preset resource inventory information table to obtain a matched resource information group; in response to determining that the matched resource information group satisfies a preset attribute value condition, the matched resource information group is split to obtain a first resource information group and a second resource information group; in response to determining that the second resource information group satisfies a preset attribute null value condition, the matching count value is updated; and based on the updated matching count value, the second resource information group is used as the dynamic resource information group, and the first resource information group generation step is performed again. Thus, each sub-matching task can perform a loop-based matching process on unmatched or unsuccessfully matched dynamic resource information groups with the resource inventory information table based on a key attribute at a time, and determine the successfully matched resource information as the first resource information. Finally, the user request identifier and each obtained first resource information group are determined as resource matching information.Therefore, the resource matching information generation method of some embodiments of the present disclosure can determine the key attributes corresponding to each resource data by normalizing the various attributes for resource data from different data sources, and enable threads to quickly generate resource matching information based on the key attributes corresponding to the resource data, without having to categorize the resource data one by one in advance. Furthermore, because resource data from any data source can be split into subtasks to accelerate the execution of resource matching tasks, the time required to generate resource matching information can be shortened. BRIEF DESCRIPTION OF THE DRAWINGS
[0016] The above and other features, advantages, and aspects of the various embodiments of the present disclosure will become more apparent with reference to the following detailed description in conjunction with the accompanying drawings. Throughout the drawings, the same or similar reference numerals represent the same or similar elements. It should be understood that the drawings are schematic and that components and elements are not necessarily drawn to scale.
[0017] Figure 1 is a flow chart of some embodiments of the resource matching information generation method according to the present disclosure;
[0018] Figure 2 is a schematic structural diagram of some embodiments of the resource matching information generating device according to the present disclosure;
[0019] Figure 3 It is a structural diagram of an electronic device suitable for implementing some embodiments of the present disclosure. DETAILED DESCRIPTION
[0020] Embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although certain embodiments of the present disclosure are shown in the accompanying drawings, it should be understood that the present disclosure can be implemented in various forms and should not be construed as being limited to the embodiments described herein. On the contrary, these embodiments are provided to provide a more thorough and complete understanding of the present disclosure. It should be understood that the drawings and embodiments of the present disclosure are for illustrative purposes only and are not intended to limit the scope of protection of the present disclosure.
[0021] It should also be noted that, for ease of description, only the parts related to the invention are shown in the drawings. In the absence of conflict, the embodiments and features in the embodiments of the present disclosure may be combined with each other.
[0022] It should be noted that the concepts of "first" and "second" mentioned in this disclosure are only used to distinguish different devices, modules or units, and are not used to limit the order or interdependence of the functions performed by these devices, modules or units.
[0023] It should be noted that the modifications of "one" and "multiple" mentioned in the present disclosure are illustrative rather than restrictive, and those skilled in the art should understand that unless otherwise clearly indicated in the context, they should be understood as "one or more".
[0024] The names of the messages or information exchanged between multiple devices in the embodiments of the present disclosure are only used for illustrative purposes and are not used to limit the scope of these messages or information.
[0025] The present disclosure will be described in detail below with reference to the accompanying drawings and in conjunction with embodiments.
[0026] Figure 1 The process 100 of some embodiments of the resource matching information generation method according to the present disclosure is shown. The resource matching information generation method includes the following steps:
[0027] Step 101 : In response to receiving resource matching request information, generating a resource attribute information sequence and a resource detail information sequence based on the resource matching request information and a preset attribute information set to be matched.
[0028] In some embodiments, the subject executing the resource matching information generation method (e.g., a computing device) may, in response to receiving a resource matching request, generate a sequence of resource attribute information and a sequence of resource detail information based on the resource matching request and a preset set of attribute information to be matched, using various methods. The resource matching request may include a user request identifier. The user request identifier may uniquely identify the user request. The user request may be a request sent by a user via a user terminal to match a resource corresponding to a target business. The target business may be a business that requires regular integration and display of its resources. For example, the target business may be, but is not limited to, one of the following: parts assembly, logistics warehousing, and software upgrades. The resources may include, but are not limited to, at least one of the following: item information, personnel information, and service information. The user terminal may be, but is not limited to, one of the following: a tablet computer or a mobile phone. The resource matching request may also include, but is not limited to, at least one of the following: a request timestamp and a resource usage information table. The request timestamp may be the timestamp when the user sends the request. The resource usage information table may be a collection of usage information for each resource instance corresponding to a resource over a period of time. The resource instance may be a specific individual resource. For example, the above-mentioned resource instance can be a single component or a single person. When the above-mentioned resource instance is a single component, the corresponding usage information can be the quantity and total value of the components corresponding to the above-mentioned resource instance used within a month. When the above-mentioned resource instance is a single person, the corresponding usage information can be the number of attendance days and total cost of the person corresponding to the above-mentioned resource instance within a month. The attribute information to be matched in the above-mentioned preset attribute information set to be matched can be information of an attribute corresponding to the resource. For example, the above-mentioned attribute can be but is not limited to one of the following: number, name, department to which it belongs, time period, etc. The resource attribute information in the above-mentioned resource attribute information sequence can represent the relationship between an attribute column in the resource usage information table and the attribute of the corresponding resource. The resource detail information in the above-mentioned resource detail information sequence can be the usage information of the corresponding resource instance.
[0029] In some optional implementations of some embodiments, the resource matching request information may further include a resource usage information table. The resource usage information table may include a header attribute column information group and a resource usage information record group. The header attribute column information group may be an ordered array consisting of individual header attribute column information in the order of the attribute columns. The header attribute column information in the header attribute column information group may include an attribute column name. The attribute column name may uniquely identify an attribute. The resource usage information record group may be an ordered array consisting of individual resource usage information records. The resource usage information records in the resource usage information record group may represent usage information corresponding to a resource instance. The resource usage information records in the resource usage information record group may include an attribute detail information group. The attribute detail information in the attribute detail information group may include, but is not limited to, one of the following: a resource attribute identifier and a resource attribute value. The resource attribute identifier may uniquely identify an attribute of a resource. The resource attribute value may be the value of an attribute of a resource. The execution entity may generate a resource attribute information sequence and a resource detail information sequence based on the resource matching request information and a preset attribute information set to be matched by the following steps:
[0030] The first step is to perform correlation analysis on the header attribute column information group included in the resource usage information table in the resource matching request information and the preset attribute information set to be matched, thereby obtaining a resource attribute information sequence. The resource attribute information sequence can be obtained by performing correlation analysis on the header attribute column information group and the preset attribute information set to be matched using various methods.
[0031] In some optional implementations of some embodiments, each attribute information to be matched in the above-mentioned attribute information set to be matched may include attribute alternative name information and a key attribute name identifier. Among them, the above-mentioned attribute alternative name information may be information of the name of the corresponding attribute. The above-mentioned key attribute name identifier may uniquely identify the key attribute name. The above-mentioned key attribute name may be a name that meets the preset character condition among the various names of the corresponding attribute. The above-mentioned preset character condition may be that the number of characters corresponding to the name is the minimum value among the number of characters corresponding to each name. For example, when the attribute is the name of the corresponding resource, if the various alternative names corresponding to the above-mentioned attribute include name, name (name), name or employee name, then the above-mentioned key attribute name may be name or name. The above-mentioned execution entity may perform an association analysis on the header attribute column information group included in the resource usage information table in the above-mentioned resource matching request information and the preset attribute information set to be matched through the following steps to obtain a resource attribute information sequence:
[0032] Step 1: For each header attribute column information in the above header attribute column information group, perform the following steps:
[0033] Sub-step 1: Perform an exact match between each attribute alternative name information included in a preset attribute information set to be matched and the above-mentioned header attribute column information to obtain matching attribute information. The matching attribute information may indicate whether any attribute alternative name information matches the above-mentioned header attribute column information. Matching the above-mentioned header attribute column information may mean that the name corresponding to the attribute alternative name information is identical to the attribute column name corresponding to the above-mentioned header attribute column information. First, the length value of the attribute column name corresponding to the above-mentioned header attribute column information is determined as a target length value. Then, from the names corresponding to the above-mentioned attribute alternative name information, names that match the target length value are selected to obtain a target name group. Matching the above-mentioned target length value may mean that the length value of the name corresponding to the attribute alternative name information is equal to the target length value. Then, from the above-mentioned target name group, target names that are identical to the attribute column name corresponding to the above-mentioned header attribute column information are selected. Then, preset successful match information is determined as the matching attribute information. The preset successful match information may indicate that any attribute alternative name information matches the above-mentioned header attribute column information. Finally, in response to determining that no target name is selected that is identical to the attribute column name corresponding to the header attribute column information, preset match failure information is determined as the matching attribute information. The preset match failure information may indicate that no attribute alternative name information matching the header attribute column information exists in the attribute alternative name information.
[0034] Sub-step two, in response to determining that the above-mentioned matching attribute information does not meet the preset matching success condition, fuzzy matching processing is performed on each attribute alternative name information included in the above-mentioned attribute information set to be matched and the above-mentioned header attribute column information to generate a name similarity value, and obtain a name similarity value group. Among them, the above-mentioned preset matching success condition can be that the above-mentioned matching attribute information is matching success information. The name similarity value in the above-mentioned name similarity value group can represent the similarity between the attribute alternative name information and the above-mentioned header attribute column information. A preset fuzzy matching processing algorithm can be used to perform fuzzy matching processing on each attribute alternative name information included in the above-mentioned attribute information set to be matched and the above-mentioned header attribute column information to generate a name similarity value, and obtain a name similarity value group.
[0035] As an example, the above-mentioned fuzzy matching processing algorithm may include but is not limited to at least one of the following: a matching algorithm based on a vector space, a matching algorithm based on a convolutional neural network.
[0036] Sub-step three: normalize each name similarity value in the above-mentioned name similarity value group to obtain a modified name similarity value group. The modified name similarity values in the above-mentioned modified name similarity value group may be normalized name similarity values. First, for each name similarity value in the above-mentioned name similarity value group, the sum of the above-mentioned name similarity value and 1 is determined as the similarity value to be normalized, and the reciprocal of the above-mentioned similarity value to be normalized is determined as the modified name similarity value. Then, the determined modified name similarity values are determined as a modified name similarity value group.
[0037] Sub-step 4: Selecting a modified name similarity value that satisfies a first preset similarity condition from the modified name similarity value group as a target name similarity value. The first preset similarity condition may be the maximum value among the modified name similarity values in the modified name similarity value group that satisfy the target preset similarity value condition. The target preset similarity value condition may be that the modified name similarity value is greater than or equal to the target similarity value. The target similarity value may be a preset value. For example, the target similarity value may be 0.6.
[0038] Sub-step five: determining the header attribute column information, the key attribute name identifier included in the attribute information to be matched corresponding to the target name similarity value, and the target name similarity value as resource attribute information.
[0039] Sub-step six, in response to determining that the above-mentioned modified name similarity value group meets the preset similarity value number condition, the key attribute name identifier included in the above-mentioned header attribute column information and the attribute information to be matched corresponding to the above-mentioned target name similarity value is determined as the newly added attribute information to be matched. Among them, the above-mentioned preset similarity value number condition may be that the number of modified name similarity values in the above-mentioned modified name similarity value group that meets the preset similarity value condition is not less than the preset number threshold. The above-mentioned preset similarity value condition may be that the modified name similarity value is not less than the preset similarity threshold. The above-mentioned preset similarity threshold may be a preset similarity threshold. For example, the above-mentioned preset similarity threshold may be 0.8. The above-mentioned preset number threshold may be a preset threshold for the number of modified name similarity values. For example, the above-mentioned preset number threshold may be 3.
[0040] Sub-step seven: adding the newly added attribute information to be matched as the attribute information to be matched to the attribute information set to be matched for storage. Specifically, the newly added attribute information to be matched can be added as the attribute information to be matched to the attribute information set to be matched, and the attribute information set to be matched can be stored in a cache.
[0041] Step 2: sorting the determined resource attribute information to obtain a resource attribute information sequence. This can be done by using a preset sorting algorithm to sort the resource attribute information corresponding to each header attribute column information according to the order of each header attribute column information in the header attribute column information group to obtain a resource attribute information sequence.
[0042] As an example, the above sorting algorithm may include but is not limited to at least one of the following: bubble sort, quick sort, etc.
[0043] Optionally, in response to determining that the matching attribute information satisfies the preset matching success condition, the execution entity may further determine the header attribute column information, the key attribute name identifier included in the attribute information to be matched corresponding to the header attribute column information, and a preset target similarity value as resource attribute information. The name corresponding to the header attribute column information may be the same as the name corresponding to the attribute alternative name information in the attribute information to be matched and the attribute column name corresponding to the header attribute column information. The preset target similarity value may be 1.
[0044] The above-mentioned resource attribute information sequence generation steps and related content, as an inventive feature of an embodiment of the present disclosure, address the second technical issue mentioned in the background technology: "generating resource matching information takes a long time." This long resource matching information generation process often results in the following issues: Due to the multitude of data sources, existing primary key attribute mapping dictionary libraries struggle to cover all data sources. Consequently, when different semantically identical primary key attributes cannot be mapped to the same primary key attribute, resource data still needs to be categorized for resource matching information generation. Resolving this issue can shorten the time required to generate resource matching information. To achieve this, the present disclosure can, when performing association analysis between the header attribute column information group included in the resource usage information table and a preset set of attribute information to be matched, first determine, for each header attribute column information in the header attribute column information group, whether the attribute column name corresponding to the header attribute column information is identical to the name corresponding to any attribute information to be matched. Secondly, if the attribute column name is different from the name corresponding to any attribute information to be matched, determine the similarity between the attribute column name and the name corresponding to each attribute information to be matched. Then, normalize each similarity to facilitate similarity comparison. Finally, if the number of similarities that are no less than a preset similarity threshold among the various similarities meets the preset threshold, the aforementioned header attribute column information and the corresponding key attribute name identifier are added to the set of attribute information to be matched for use in the next resource matching task. Therefore, the aforementioned steps for generating a resource attribute information sequence and its related content can cover more data sources by continuously accumulating new attribute mappings during the execution of resource matching tasks, thereby reducing the number of resource data classifications. This can thus shorten the time required to generate resource matching information.
[0045] The second step is to reconstruct each resource usage information record in the resource usage information record group included in the resource usage information table based on the resource attribute information sequence to obtain a resource detail information sequence. Specifically, the following steps can be performed to obtain the resource detail information sequence:
[0046] The first sub-step is to reconstruct, for each resource usage information record in the resource usage information record group, each attribute detail information in the attribute detail information group included in the resource usage information record to obtain resource detail information. Specifically, the resource detail information can be reconstructed by the following steps:
[0047] Step 1: For each attribute detail information in the attribute detail information group included in the resource usage information record, the following steps may be performed:
[0048] Sub-step 1: Select resource attribute information that matches the attribute details information from the resource attribute information sequence, wherein matching the attribute details information may be that the attribute column name corresponding to the resource attribute information is the same as the resource attribute identifier corresponding to the attribute details information.
[0049] Sub-step 2: determining the key attribute name identifier included in the selected resource attribute information and the resource attribute value corresponding to the attribute detail information as the target attribute detail information.
[0050] Step 2: Determine each target attribute detail information determined as resource detail information.
[0051] The second sub-step is to sort the determined resource detail information according to the order of the resource usage information records corresponding to the resource detail information in the resource usage information record group using the above-mentioned sorting algorithm to obtain a resource detail information sequence.
[0052] Optionally, before generating the resource attribute information sequence and the resource detail information sequence based on the resource usage information table and the preset attribute information set to be matched, the execution entity may further perform the following steps:
[0053] The first step involves adding the resource matching request information to a preset task queue corresponding to a thread pool, and storing the resource matching request information and preset execution status information in a preset task information table. The thread pool may be a ForkJoinPool (multi-threaded parallel computing framework) thread pool. The preset task queue may be a double-ended queue (DOQ). The preset execution status information may indicate that the thread task's execution status is pending. This execution status may be, but is not limited to, one of the following: pending, started, and completed. The preset task information table may be a pre-set data table stored in a Redis (storage system) component. The task information table may include a task information record group. Each task information record in the task information record group may represent a task corresponding to a resource matching request. The resource matching request information may be added to the preset task queue from the end of the preset task queue, and the resource matching request information and preset execution status information may be stored in the preset task information table.
[0054] The second step is to update the requested task quantity value corresponding to the preset task queue. The requested task quantity value may be the number of tasks in the preset task queue. The sum of the requested task quantity value corresponding to the preset task queue and 1 may be used as the updated number of tasks in the preset task queue.
[0055] In a third step, in response to determining that the resource matching request information meets a preset asynchronous condition, the preset execution mode configuration information is updated based on the preset asynchronous mode information to enable asynchronous mode. The preset asynchronous condition may be: the request timestamp included in the resource matching request information is within a preset time interval, or the number of resource usage information records in the resource usage information record group included in the resource usage information table in the resource matching request information is no less than a preset record threshold. The preset time interval may be a preset time period. For example, the preset time interval may be the 29th to 30th of each calendar month, or 9:00 to 18:00 daily. The preset record threshold may be a preset upper limit for the number of resource usage information records. For example, the preset record threshold may be 1000. The preset asynchronous mode information may be asynchronous configuration information corresponding to a preset asynchronous mode. The asynchronous mode may be a mode in which tasks in a preset task queue can be executed by other idle threads without waiting for the previous task to complete. The asynchronous configuration information may be a string corresponding to the asynchronous mode. For example, the asynchronous configuration information may be "async." The above-mentioned preset execution mode configuration information may be information about a pre-set execution mode. The above-mentioned execution mode may include a synchronous mode and an asynchronous mode. The above-mentioned synchronous mode may be a mode in which a task in a preset task queue needs to wait for the previous task to be completed before it starts to execute. The above-mentioned preset execution mode configuration information may include an execution mode attribute value. The above-mentioned mode attribute value may represent the execution mode. The execution mode attribute value included in the above-mentioned execution mode configuration information may be updated to a first preset string, and the updated execution mode configuration information may be transmitted to the thread pool to enable asynchronous mode for task execution. The above-mentioned first preset string may be a string corresponding to the above-mentioned asynchronous configuration information.
[0056] Optionally, the execution subject may also update the preset execution mode configuration information based on the preset synchronization mode information in response to determining that the resource matching request information does not meet the preset asynchronous condition, so as to enable the synchronization mode. The preset synchronization mode information may be the synchronization configuration information corresponding to the preset synchronization mode. The synchronization configuration information may be a character string corresponding to the synchronization mode. For example, the synchronization configuration information may be "sync". The execution mode attribute value included in the execution mode configuration information may be updated to a second preset character string, and the updated execution mode configuration information may be transmitted to the thread pool to enable the synchronization mode for task execution. The second preset character string may be a character string corresponding to the synchronization configuration information.
[0057] Step 102: Based on a preset key attribute information sequence, the resource attribute information sequence is detected and processed to obtain a resource key attribute information sequence.
[0058] In some embodiments, the execution entity may detect and process the resource attribute information sequence based on a preset key attribute information sequence to obtain a resource key attribute information sequence. The preset key attribute information sequence may be a sequence in which the key attribute information is arranged in order of priority of the corresponding attributes. The priority may be pre-set. The key attribute information in the key attribute information sequence may include a key attribute identifier. The key attribute identifier may uniquely identify the attribute of the resource. The resource key attribute information in the resource key attribute information sequence may be resource attribute information in the resource attribute information sequence that is identical to an attribute corresponding to the key attribute information sequence. The execution entity may detect and process the resource attribute information sequence based on a preset key attribute information sequence in various ways to obtain a resource key attribute information sequence.
[0059] In some optional implementations of some embodiments, the execution entity may detect and process the resource attribute information sequence based on a preset key attribute information sequence through the following steps to obtain a resource key attribute information sequence:
[0060] In the first step, resource attribute information that matches a preset key attribute information sequence is selected from the resource attribute information sequence as target key resource attribute information, thereby obtaining a target key resource attribute information group. Matching the preset key attribute information sequence may mean that the key attribute name identifier corresponding to the resource attribute information is identical to a key attribute identifier corresponding to the key attribute information sequence.
[0061] In the second step, the target key resource attribute information that satisfies a second preset similarity condition in the target key resource attribute information group is determined as the resource key attribute information to obtain a resource key attribute information set. The second preset similarity condition may be that the similarity value corresponding to the target key resource attribute information is greater than the preset similarity threshold.
[0062] The third step is to sort the resource key attribute information set to obtain a resource key attribute information sequence. The resource key attribute information set can be sorted by the above-mentioned sorting algorithm according to the arrangement order of each resource attribute information corresponding to the resource key attribute information sequence to obtain the resource key attribute information sequence.
[0063] Optionally, the above execution entity may further perform the following steps:
[0064] In a first step, in response to determining that none of the target key resource attribute information in the target key resource attribute information group satisfies the second preset similarity condition, the target key resource attribute information in the target key resource attribute information group is sorted to obtain a target key resource attribute information sequence. The target key resource attribute information sequence can be obtained by sorting the target key resource attribute information in the target key resource attribute information group in descending order based on the similarity values corresponding to the target key resource attribute information in the target key resource attribute information group using the sorting algorithm.
[0065] In the second step, each target key resource attribute information in the target key resource attribute information sequence that satisfies a preset sequence number condition is determined as a resource key attribute information sequence. The preset sequence number condition may be that the sequence number corresponding to the target key resource attribute information in the target key resource attribute information sequence is less than or equal to a preset sequence number value. For example, the preset sequence number value may be 3.
[0066] Step 103: split the resource detail information sequence to obtain a dynamic resource information set.
[0067] In some embodiments, the execution entity may split the resource detail information sequence to obtain a dynamic resource information group set. The dynamic resource information group in the dynamic resource information group set may be a subsequence of the resource detail information sequence. The resource detail information sequence may be split to obtain a dynamic resource information group set by the following steps:
[0068] In the first step, the number of resource detail information in the resource detail information sequence is determined as the number of resource details.
[0069] The second step is to determine the quotient of the number of resource details and the preset number of sub-threads as the splitting step value. The preset number of sub-threads may be a pre-set number of sub-threads. It should be noted that if the quotient of the number of resource details and the preset number of sub-threads is not an integer, the quotient may be rounded up to determine the splitting step value.
[0070] The third step is to truncate the resource detail information sequence according to the splitting step value to obtain dynamic resource information groups in the dynamic resource information group set. First, starting with the first resource detail information in the resource detail information sequence, a number of resource detail information pieces equal to the splitting step value can be sequentially truncated as dynamic resource information groups, and the untruncated portion of the resource detail information sequence can be determined as the sequence to be truncated. Then, the truncation step is repeated using the sequence to be truncated as the resource detail information sequence according to the splitting step value. Finally, the truncated dynamic resource information groups are determined as the dynamic resource information group set.
[0071] Step 104: For each dynamic resource information group in the dynamic resource information group set, perform the following steps:
[0072] Step 1041: Initialize the preset matching times to a preset value, and perform the following first resource information group generation steps based on the dynamic resource information group:
[0073] Step 10411, in response to determining that the matching number value satisfies the number threshold condition, target key attribute information and target pattern function information are determined based on a preset pattern function information set, matching number value and resource key attribute information sequence.
[0074] In some embodiments, in response to determining that the match count value satisfies a count threshold condition, the execution entity may determine target key attribute information and target pattern function information based on a preset pattern function information set, the match count value, and the resource key attribute information sequence. The preset value may be 1. The preset match count value may be a preset number of attribute matching rounds. The count threshold condition may be that the match count value is not greater than a preset count threshold. The preset count threshold may be a preset upper limit of the count. For example, the preset count threshold may be 3. The pattern function information in the preset pattern function information set may include information about a function corresponding to the attribute and required to be called for task execution. The pattern function information in the pattern function information set may include a pattern identifier. The pattern identifier may uniquely identify a key attribute name. The target key attribute information may include information about the matched attribute corresponding to the match count value. The target pattern function information may include pattern function information that matches the attribute corresponding to the target key attribute information. Matching the attribute corresponding to the target key attribute information may require that the pattern identifier corresponding to the pattern function information and the key attribute name identifier corresponding to the target key attribute information are identical. First, the matching number value in the resource key attribute information sequence is determined as the target key attribute information. Then, the pattern function information in the pattern function information set that matches the target key attribute information is determined as the target pattern function information.
[0075] Step 10412: Based on the target key attribute information and the target mode function information, the dynamic resource information group and the preset resource inventory information table are matched to obtain a matched resource information group.
[0076] In some embodiments, the execution subject may match the dynamic resource information group and the preset resource inventory information table in various ways based on the target key attribute information and the target pattern function information to obtain a matched resource information group. The preset resource inventory information table may include a resource inventory information record group. The resource inventory information records in the resource inventory information record group may represent resource instances. The resource inventory information records in the resource inventory information record group may include an attribute inventory information group. The attribute inventory information in the attribute inventory information group may include an inventory attribute identifier and an inventory attribute value. The inventory attribute identifier may uniquely identify an attribute. The inventory attribute value may be the value of the corresponding attribute. The matched resource information in the matched resource information group may represent usage information of a resource instance.
[0077] In some optional implementations of some embodiments, the target pattern function information may include a pattern identifier, first pattern function information, second pattern function information, and third pattern function information. The first pattern function information may represent a first pattern function. The first pattern function may be a function called by a child thread to obtain an attribute value corresponding to the target key attribute information in dynamic resource information. The second pattern function information may represent a second pattern function. The second pattern function may be a function called by a child thread to clean the attribute value obtained by the first pattern function. The data cleansing may employ different data cleansing methods depending on the attribute value, which is not specifically limited herein. For example, if the attribute value is "X'space'XX", a data cleansing method that removes spaces may be employed. The third pattern function information may represent a third pattern function. The third pattern function may be a function called by a child thread to obtain an attribute value corresponding to the target key attribute information in a resource inventory information record. The execution entity may perform matching processing on the dynamic resource information group and a preset resource inventory information table based on the target key attribute information and the target pattern function information through the following steps to obtain a matched resource information group:
[0078] The first step is to determine the resource inventory information table, the target key attribute information, the target mode function information and the dynamic resource information group as target subtask information, and add the target subtask information to the pre-generated task queue of the sub-thread.
[0079] In the second step, in response to determining that the target subtask information satisfies the preset location condition, for each dynamic resource information in the dynamic resource information group included in the target subtask information, the following steps are performed to generate matched resource information in the matched resource information group:
[0080] The first sub-step is to generate a pattern attribute value based on the above-mentioned first pattern function information, the target key attribute information included in the above-mentioned target subtask information and the above-mentioned dynamic resource information. Among them, the above-mentioned preset position condition can be that the above-mentioned target subtask information is ranked first in the task queue. The above-mentioned pattern attribute value can be a resource attribute value in the above-mentioned dynamic resource information that matches the above-mentioned target key attribute information. Matching the above-mentioned target key attribute information can be that a key attribute name identifier included in the dynamic resource information is the same as the key attribute name identifier included in the above-mentioned target key attribute information. First, the key attribute name identifier included in the target key attribute information in the above-mentioned target subtask information is determined as the first input parameter. Then, the child thread can be controlled to call the first pattern function corresponding to the first pattern function information, and the resource attribute value corresponding to the above-mentioned first input parameter in the above-mentioned dynamic resource information can be determined as the pattern attribute value.
[0081] The second sub-step involves preprocessing the pattern attribute value based on the second pattern function information to obtain a target attribute value. The target attribute value may be a cleansed pattern attribute value. First, the pattern attribute value is determined as a second input parameter. The control sub-thread then calls the second pattern function corresponding to the second pattern function information and preprocesses the second input parameter using a preset data cleansing method to obtain the target attribute value.
[0082] As an example, the data cleaning method may include but is not limited to at least one of the following: a method for converting a numerical value into a string, a method for deleting redundant spaces, and a method for deleting special characters.
[0083] The third sub-step is to generate the target resource list information based on the third mode function information, the target attribute value, the target key attribute information included in the target subtask information, and the resource list information table. The target resource list information may be a resource list information record that matches the target attribute value and the target key attribute information. Matching the target attribute value may be: in the resource list information record, an attribute list information corresponding to the attribute list information group includes an inventory attribute identifier that is the same as the key attribute name identifier corresponding to the target key attribute information, and includes an inventory attribute value that is the same as the target attribute value. First, the key attribute name identifier and the target attribute value included in the target key attribute information in the target subtask information are determined as the third input parameter. Then, the child thread can be controlled to call the third mode function corresponding to the third mode function information, and the resource list information record that matches the third input parameter in the resource list information record group included in the resource list information table can be determined as the target resource list information.
[0084] In a fourth sub-step, in response to determining that the target resource list information satisfies a preset matching condition, the target resource list information and the dynamic resource information are determined as matched resource information, wherein the preset matching condition may be that the target resource list information is not empty.
[0085] Optionally, the execution entity may further determine the dynamic resource information as matched resource information in response to determining that the target resource list information does not satisfy the preset matching condition.
[0086] Step 10413: In response to determining that the matched resource information group meets the preset attribute value condition, the matched resource information group is split to obtain a first resource information group and a second resource information group.
[0087] In some embodiments, the execution entity may, in response to determining that the matched resource information group satisfies a preset attribute value condition, split the matched resource information group to obtain a first resource information group and a second resource information group. The preset attribute value condition may be that at least one matched resource information in the matched resource information group does not include resource inventory information. For each matched resource information in the matched resource information group, in response to determining that the matched resource information includes resource inventory information, the matched resource information may be determined as first resource information, and in response to determining that the matched resource information does not include resource inventory information, the matched resource information may be determined as second resource information.
[0088] Step 10414, in response to determining that the second resource information group meets the preset attribute null value condition, the matching number value is updated, and based on the updated matching number value, the second resource information group is used as a dynamic resource information group, and the first resource information group generation step is executed again.
[0089] In some embodiments, the execution entity may update the match count value in response to determining that the second resource information group satisfies a preset attribute null value condition, and based on the updated match count value, use the second resource information group as a dynamic resource information group and re-execute the first resource information group generation step. The preset attribute null value condition may be that the second resource information group is not null. First, the sum of the match count value and 1 is determined as the update count value, and then the update count value is determined as the match count value to update the match count value. Finally, based on the updated match count value, use the second resource information group as a dynamic resource information group and re-execute the first resource information group generation step.
[0090] Step 105: Determine the user request identifier and each obtained first resource information group as resource matching information.
[0091] In some embodiments, the execution entity may determine the user request identifier and each obtained first resource information group as resource matching information.
[0092] Optionally, the above execution entity may further perform the following steps:
[0093] In the first step, in response to determining that the matched resource information group does not satisfy the preset attribute value condition, the matched resource information group is determined as the first resource information group.
[0094] The second step is to send each first resource information group included in the resource matching information to a target terminal for display. The target terminal may be the user terminal used by the user to send the resource matching request information. Each first resource information group included in the resource matching information may be sent to the target terminal, which then displays the first resource information group.
[0095] Optionally, the above execution entity may further perform the following steps:
[0096] In the first step, the difference between the requested task quantity and the preset step value is determined as the remaining task value, wherein the preset step value may be the preset number of tasks to be deleted.
[0097] In the second step, in response to determining that the remaining task value is a preset task value, the task corresponding to the resource matching request information is deleted from the preset task queue. The preset task value may be a preset value of the remaining tasks. For example, the preset task value may be 0.
[0098] In the third step, based on the first resource information groups included in the resource matching information, the pre-generated download file is updated to generate a target download file. The download file may be an empty file. The target download file may be an updated download file. The first resource information groups included in the resource matching information may be written to the pre-generated download file as a data stream to update the download file and obtain the target download file.
[0099] The fourth step is to store the target download file in a preset file server, wherein the preset file server may be a server for storing files to be downloaded by the user.
[0100] In the fifth step, a download link corresponding to the target download file is sent to the target terminal for the user to download and view. The download link may be the storage path of the target download file on a file server. The download link corresponding to the target download file may be sent to the target terminal. The user clicks the download link, and the target download file is downloaded to the target terminal. The user then opens the downloaded target download file to view it.
[0101] The above-mentioned updating steps of the requested task quantity value and the execution mode configuration information and their related contents, as an inventive point of an embodiment of the present disclosure, solve the third technical problem mentioned in the background technology: "If a combination of multi-threaded concurrency and a double-ended queue is used to execute multiple resource matching tasks, thread competition will result when the task volume is small, thereby causing data redundancy." The reasons for data redundancy are often as follows: If a combination of multi-threaded concurrency and a double-ended queue is used to execute multiple resource matching tasks, thread competition will result when the task volume is small. If the above-mentioned problem is solved, the effect of avoiding data redundancy can be achieved. In order to achieve this effect, first, the number of tasks in the preset task queue can be monitored by the requested task quantity value. Then, it can be determined whether the asynchronous mode needs to be turned on based on the time interval corresponding to the current time and the amount of data corresponding to the resource matching task. If the current time is a peak period or the amount of data is large, the asynchronous mode is turned on. Otherwise, the synchronous mode is turned on to avoid thread competition. Finally, in asynchronous mode, when there is only one task in the preset task queue, after a thread completes executing that task, it first determines whether the number of remaining unexecuted tasks reaches the preset value. If so, the thread's task execution result is returned normally; otherwise, the thread's task execution result is discarded. This ensures that only one execution result is returned for each task, preventing duplication and avoiding data redundancy.
[0102] Optionally, the above execution entity may further perform the following steps:
[0103] In the first step, in response to determining that a server on which any child thread resides has experienced a power outage, a child thread execution information set is obtained. Each child thread execution information in the child thread execution information set may include a child thread identifier and an execution status identifier. The child thread identifier uniquely identifies the thread. The execution status identifier uniquely identifies the execution status of the thread. The execution status may be, but is not limited to, one of the following: pending execution, running, and interrupted.
[0104] In the second step, each sub-thread running information that meets a preset state condition in the sub-thread running information set is determined as a sub-thread running information group, wherein the preset state condition may be that the running state identifier included in the sub-thread running information indicates that the running state of the thread is interrupted.
[0105] In the third step, each user request identifier corresponding to each sub-thread identifier in the sub-thread running information group is determined as a user request identifier group.
[0106] In the fourth step, each resource matching request information that matches the user request identifier group in the preset task queue is determined as a request information group to be executed. Matching the user request identifier group may mean that the user request identifier in the user request identifier group is the same as the user request identifier included in the resource matching request information.
[0107] Step 5: Initialize each execution status information corresponding to the pending request information group to a preset status value. The preset status value may indicate that the execution status is a pending status. For each pending request information in the pending request information group, the execution status information corresponding to the pending request information may be initialized to the preset status value.
[0108] Optionally, the above execution entity may further perform the following steps:
[0109] The first step is to obtain the user request identifier corresponding to the thread error information in response to receiving the thread error information. The thread error information may be an error reminder message output during the thread task execution process. The error reminder message may be information reminding the user that the current thread has an error. The thread error information may include a child thread identifier, an error time, and an error text message. The error time may be the time when the thread outputs the error reminder message. The error text message may be information in text form about the task execution error. For example, the error text message may be "Cannot find XXX object". The user request identifier corresponding to the thread error information may be obtained from the running log file corresponding to the thread based on the child thread identifier and error time included in the thread error information.
[0110] In the second step, a resource matching request information that matches the user request identifier is selected from the preset task queue as error reporting task information, wherein matching the user request identifier may be that the user request identifier corresponding to the resource matching request information is the same as the user request identifier.
[0111] The third step is to delete each first resource information group corresponding to the error reporting task information, wherein each first resource information group corresponding to each sub-thread can be deleted according to each sub-thread corresponding to the error reporting task information.
[0112] The fourth step is to update the execution status information corresponding to the error-reporting task information, and call the thread to re-execute the task corresponding to the error-reporting task information. The execution subject may initialize the execution status information corresponding to the error-reporting task information to the preset state value, and call the thread to re-execute the task corresponding to the error-reporting task information.
[0113] Optionally, the execution entity may further delete the task information record corresponding to the user request identifier in the resource matching information from a preset task information table in response to determining that the resource matching information has been generated.
[0114] The above-mentioned steps for generating resource matching information after a service abnormal interruption and their related contents, as an inventive feature of an embodiment of the present disclosure, address technical problem 4 mentioned in the background technology: "difficulty in timely generating resource matching information after a service restart." This difficulty in timely generating resource matching information after a service restart is often caused by the following: If a service abnormal interruption occurs during resource matching information generation (e.g., due to network outage or database disconnection), the task data is lost when the service restarts. By resolving this issue, resource matching information can be generated in a timely manner after a service restart. To achieve this, first, the resource matching task and the corresponding execution status information can be stored in a task information table to prevent task data loss during service abnormalities. Second, the running status of each child thread can be monitored. Then, when a server loses power, the user request identifier corresponding to the child thread on the server can be collected. The execution status of the resource matching task corresponding to the user request identifier can then be initialized to pending, allowing the thread to be reinvoked to execute the pending task after the service restarts. Furthermore, when a thread reports an error, the error-reporting task information corresponding to the error-reporting thread can be collected, and the execution status corresponding to the error-reporting task information can be initialized to pending, allowing the thread to be reinvoked to execute the pending task after the service restarts. Finally, after the service restarts, the thread is called to execute the pending task and generate resource matching information. Therefore, if a service is interrupted, by collecting information about the task corresponding to the thread and initializing the task's execution status to pending, the thread can be called to re-execute the pending task when the service restarts. This allows for timely generation of resource matching information after the service restarts.
[0115] The above-described embodiments of the present disclosure have the following beneficial effects: The resource matching information generation methods of some embodiments of the present disclosure can shorten the time required to generate resource matching information. Specifically, the long time required to generate resource matching information is due to the fact that if resource data from different data sources has different primary key attributes, the resource data typically needs to be classified and then matched separately to generate the resource matching information. Based on this, the resource matching information generation methods of some embodiments of the present disclosure first generate a resource attribute information sequence and a resource detail information sequence based on the resource matching request and a preset set of attribute information to be matched in response to receiving a resource matching request. The resource matching request may include a user request identifier. This generates a resource matching task and determines the normalized attributes and attribute value data corresponding to the resource matching task, facilitating subsequent matching of the attribute value data based on the attributes corresponding to the resource matching task. Secondly, based on a preset key attribute information sequence, the resource attribute information sequence is detected to obtain a resource key attribute information sequence. This determines the key attributes among the attributes corresponding to the resource matching task. The resource detail information sequence is then split to obtain a dynamic resource information set. Thus, the resource matching task can be split into various sub-matching tasks, so that each subsequent sub-matching task performs matching processing on a corresponding dynamic resource information group. Subsequently, for each dynamic resource information group in the dynamic resource information group set, the following steps are performed: a preset matching count value is initialized to a preset value; and based on the dynamic resource information group, the following first resource information group generation step is performed: in response to determining that the matching count value satisfies a count threshold condition, target key attribute information and target pattern function information are determined based on a preset pattern function information set, the matching count value, and the resource key attribute information sequence; based on the target key attribute information and the target pattern function information, the dynamic resource information group is matched with a preset resource inventory information table to obtain a matched resource information group; in response to determining that the matched resource information group satisfies a preset attribute value condition, the matched resource information group is split to obtain a first resource information group and a second resource information group; in response to determining that the second resource information group satisfies a preset attribute null value condition, the matching count value is updated; and based on the updated matching count value, the second resource information group is used as the dynamic resource information group, and the first resource information group generation step is performed again. Thus, each sub-matching task can perform a loop-based matching process on unmatched or unsuccessfully matched dynamic resource information groups with the resource inventory information table based on a key attribute at a time, and determine the successfully matched resource information as the first resource information. Finally, the user request identifier and each obtained first resource information group are determined as resource matching information.Therefore, the resource matching information generation method of some embodiments of the present disclosure can determine the key attributes corresponding to each resource data by normalizing the various attributes for resource data from different data sources, and enable threads to quickly generate resource matching information based on the key attributes corresponding to the resource data, without having to categorize the resource data one by one in advance. Furthermore, because resource data from any data source can be split into subtasks to accelerate the execution of resource matching tasks, the time required to generate resource matching information can be shortened.
[0116] Further references Figure 2 As an implementation of the methods shown in the above figures, the present disclosure provides some embodiments of a resource matching information generating device. These device embodiments are similar to Figure 1 Corresponding to the method embodiments shown, the device can be specifically applied to various electronic devices.
[0117] like Figure 2As shown, some embodiments of the resource matching information generation device 200 include: a generation unit 201, a detection processing unit 202, a splitting processing unit 203, an execution unit 204 and a determination unit 205. The generation unit 201 is configured to generate a resource attribute information sequence and a resource detail information sequence based on the resource matching request information and a preset attribute information set to be matched in response to receiving the resource matching request information, wherein the resource matching request information includes a user request identifier; the detection processing unit 202 is configured to perform detection processing on the resource attribute information sequence based on a preset key attribute information sequence to obtain a resource key attribute information sequence; the splitting processing unit 203 is configured to perform splitting processing on the resource detail information sequence to obtain a dynamic resource information group set; the execution unit 204 is configured to perform the following steps for each dynamic resource information group in the dynamic resource information group set: initialize a preset matching number value to a preset value, and perform the following first resource information group generation step based on the dynamic resource information group: in response to determining that the matching number value meets a number threshold condition, Based on a preset pattern function information set, a matching number value and the above-mentioned resource key attribute information sequence, target key attribute information and target pattern function information are determined; based on the above-mentioned target key attribute information and the above-mentioned target pattern function information, a dynamic resource information group and a preset resource inventory information table are matched to obtain a matched resource information group; in response to determining that the above-mentioned matched resource information group meets the preset attribute value condition, the above-mentioned matched resource information group is split to obtain a first resource information group and a second resource information group; in response to determining that the above-mentioned second resource information group meets the preset attribute null value condition, the matching number value is updated, and based on the updated matching number value, the above-mentioned second resource information group is used as a dynamic resource information group, and the above-mentioned first resource information group generation step is executed again; the determination unit 205 is configured to determine the above-mentioned user request identifier and the obtained first resource information groups as resource matching information.
[0118] It is understood that the units described in the device 200 are similar to those described in the reference Figure 1 Therefore, the operations, features and beneficial effects described above for the method are also applicable to the device 200 and the units included therein, and will not be repeated here.
[0119] Further references Figure 3 , which shows a structural diagram of an electronic device 300 suitable for implementing some embodiments of the present disclosure. Figure 3 The electronic device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present disclosure.
[0120] like Figure 3As shown, electronic device 300 may include a processing device (e.g., a central processing unit, a graphics processing unit, etc.) 301, which can perform various appropriate actions and processes based on programs stored in a read-only memory (ROM) 302 or programs loaded from a storage device 308 into a random access memory (RAM) 303. RAM 303 also stores various programs and data required for the operation of electronic device 300. Processing device 301, ROM 302, and RAM 303 are interconnected via a bus 304. An input / output (I / O) interface 305 is also connected to bus 304.
[0121] Typically, the following devices may be connected to the I / O interface 305: an input device 306 including, for example, a touch screen, a touchpad, a keyboard, a mouse, a camera, a microphone, an accelerometer, a gyroscope, etc.; an output device 307 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; a storage device 308 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 309. The communication device 309 may allow the electronic device 300 to communicate with other devices wirelessly or by wire to exchange data. Figure 3 The electronic device 300 is shown with various devices, but it should be understood that it is not required to implement or possess all of the devices shown. More or fewer devices may be implemented or possessed instead. Figure 3 Each block shown in the figure may represent one device, or may represent multiple devices as needed.
[0122] In particular, according to some embodiments of the present disclosure, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, some embodiments of the present disclosure include a computer program product comprising a computer program carried on a computer-readable medium, the computer program comprising program code for executing the method shown in the flowchart. In some such embodiments, the computer program can be downloaded and installed from a network via the communication device 309, or installed from the storage device 308, or installed from the ROM 302. When the computer program is executed by the processing device 301, the above-mentioned functions defined in the method of some embodiments of the present disclosure are performed.
[0123] It should be noted that in some embodiments of the present disclosure, the computer-readable medium described above may be a computer-readable signal medium or a computer-readable storage medium, or any combination thereof. Computer-readable storage media may include, for example, but not limited to, electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices, or components, or any combination thereof. More specific examples of computer-readable storage media may include, but are not limited to, an electrical connection having one or more conductors, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination thereof. In some embodiments of the present disclosure, a computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, device, or component. Furthermore, in some embodiments of the present disclosure, a computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, carrying 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 thereof. A computer-readable signal medium may also be any computer-readable medium other than a computer-readable storage medium that can transmit, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer-readable medium may be transmitted using any suitable medium, including but not limited to wire, optical cable, RF (radio frequency), or any suitable combination thereof.
[0124] In some embodiments, the client and server can communicate using any currently known or later developed network protocol, such as HTTP (HyperText Transfer Protocol), and can 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 later developed network.
[0125] The above-mentioned computer-readable medium may be included in the above-mentioned device; or it may exist independently and not be assembled into the electronic device. The above-mentioned computer-readable medium carries one or more programs. When the above-mentioned one or more programs are executed by the electronic device, the electronic device: in response to receiving the resource matching request information, based on the above-mentioned resource matching request information and the preset attribute information set to be matched, generates a resource attribute information sequence and a resource detail information sequence, wherein the above-mentioned resource matching request information includes a user request identifier; based on the preset key attribute information sequence, detects and processes the above-mentioned resource attribute information sequence to obtain a resource key attribute information sequence; splits and processes the above-mentioned resource detail information sequence to obtain a dynamic resource information group set; for each dynamic resource information group in the above-mentioned dynamic resource information group set, performs the following steps: initializes the preset matching number value to a preset value, and based on the dynamic resource information group, performs the following first resource information group generation step: in response to determining that the matching number value meets the number threshold value condition, based on the preset pattern function information set, the matching number value and the above-mentioned resource key attribute information sequence, determine the target key attribute information and the target pattern function information; based on the above-mentioned target key attribute information and the above-mentioned target pattern function information, match the dynamic resource information group and the preset resource inventory information table to obtain the matched resource information group; in response to determining that the above-mentioned matched resource information group meets the preset attribute value condition, split the above-mentioned matched resource information group to obtain the first resource information group and the second resource information group; in response to determining that the above-mentioned second resource information group meets the preset attribute null value condition, update the matching number value, and based on the updated matching number value, use the above-mentioned second resource information group as the dynamic resource information group and execute the above-mentioned first resource information group generation step again; determine the above-mentioned user request identifier and the obtained first resource information groups as resource matching information.
[0126] Computer program code for performing the operations of some embodiments of the present disclosure may be written in one or more programming languages, or a combination thereof, including 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 stand-alone 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 through 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., through the Internet using an Internet service provider).
[0127] The flowcharts and block diagrams in the accompanying drawings illustrate the possible implementation architecture, functions and operations of the systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each box in the flowchart or block diagram can represent a module, program segment, or a part of code, and the module, program segment, or a part of 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 box can also occur in a different order than that marked in the accompanying drawings. For example, two 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 box in the block diagram and / or flowchart, and the combination of the boxes in the block diagram and / or flowchart, can be implemented with a dedicated hardware-based system that performs the specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0128] The units described in some embodiments of the present disclosure may be implemented in software or in hardware. The units described may also be provided in a processor. For example, they may be described as follows: a processor including a generation unit, a detection processing unit, a splitting processing unit, an execution unit, and a determination unit. The names of these units do not, in some cases, constitute limitations on the units themselves. For example, the generation unit may also be described as a "unit for generating a resource attribute information sequence and a resource detail information sequence."
[0129] The functions described above herein may be performed, at least in part, by one or more hardware logic components. For example, and 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.
[0130] The above descriptions are merely some preferred embodiments of the present disclosure and illustrate the underlying technical principles. Those skilled in the art should understand that the scope of the invention encompassed by the embodiments of the present disclosure is not limited to technical solutions formed by specific combinations of the aforementioned technical features. It also encompasses other technical solutions formed by any combination of the aforementioned technical features or their equivalents, without departing from the aforementioned inventive concept. For example, a technical solution formed by replacing the aforementioned features with (but not limited to) technical features with similar functions disclosed in the embodiments of the present disclosure.
Claims
1. A method for generating resource matching information, comprising: In response to receiving the resource matching request information, generating a resource attribute information sequence and a resource detail information sequence based on the resource matching request information and a preset attribute information set to be matched, wherein the resource matching request information includes a user request identifier; Based on a preset key attribute information sequence, detecting and processing the resource attribute information sequence to obtain a resource key attribute information sequence; Splitting the resource detail information sequence to obtain a dynamic resource information group set; For each dynamic resource information group in the dynamic resource information group set, perform the following steps: Initialize the preset matching times to a preset value, and perform the following first resource information group generation step based on the dynamic resource information group: In response to determining that the matching number value satisfies a number threshold condition, determining target key attribute information and target pattern function information based on a preset pattern function information set, the matching number value, and the resource key attribute information sequence; Based on the target key attribute information and the target mode function information, matching the dynamic resource information group with a preset resource inventory information table to obtain a matched resource information group; In response to determining that the matched resource information group meets the preset attribute value condition, splitting the matched resource information group to obtain a first resource information group and a second resource information group; In response to determining that the second resource information group satisfies a preset attribute null value condition, updating a matching count value, and based on the updated matching count value, using the second resource information group as a dynamic resource information group and performing the first resource information group generating step again; The user request identifier and each obtained first resource information group are determined as resource matching information.
2. The method according to claim 1, wherein The method further comprises: In response to determining that the matched resource information group does not satisfy the preset attribute value condition, determining the matched resource information group as the first resource information group; Each first resource information group included in the resource matching information is sent to a target terminal for display.
3. The method according to claim 1, wherein Before generating a resource attribute information sequence and a resource detail information sequence based on the resource matching request information and a preset attribute information set to be matched, the method further includes: Adding the resource matching request information to a preset task queue corresponding to the thread pool, and storing the resource matching request information and preset execution status information in a preset task information table; Update the requested task quantity value corresponding to the preset task queue; In response to determining that the resource matching request information meets the preset asynchronous condition, the preset execution mode configuration information is updated based on the preset asynchronous mode information to enable the asynchronous mode.
4. The method according to claim 1, wherein The resource matching request information further includes a resource usage information table, wherein the resource usage information table includes a header attribute column information group and a resource usage information record group; as well as The generating of a resource attribute information sequence and a resource detail information sequence based on the resource matching request information and a preset attribute information set to be matched includes: Performing correlation analysis on the header attribute column information group included in the resource usage information table in the resource matching request information and the preset attribute information set to be matched to obtain a resource attribute information sequence; Based on the resource attribute information sequence, each resource usage information record in the resource usage information record group included in the resource usage information table is reconstructed to obtain a resource detail information sequence.
5. The method according to claim 4, wherein Each of the attribute information to be matched in the attribute information set to be matched includes attribute alternative name information and a key attribute name identifier; and The step of performing correlation analysis on the header attribute column information group included in the resource usage information table in the resource matching request information and the preset attribute information set to be matched to obtain a resource attribute information sequence includes: For each header attribute column information in the header attribute column information group, perform the following steps: Performing precise matching processing on each attribute alternative name information included in the preset attribute information set to be matched and the header attribute column information to obtain matching attribute information; In response to determining that the matching attribute information does not meet the preset matching success condition, performing fuzzy matching processing on each attribute alternative name information included in the to-be-matched attribute information set and the header attribute column information to generate a name similarity value, thereby obtaining a name similarity value group; Normalizing each name similarity value in the name similarity value group to obtain a modified name similarity value group; Selecting a modified name similarity value that meets a first preset similarity condition from the modified name similarity value group as a target name similarity value; Determine the header attribute column information, the key attribute name identifier included in the attribute information to be matched corresponding to the target name similarity value, and the target name similarity value as resource attribute information; In response to determining that the modified name similarity value group meets a preset similarity value number condition, determining the key attribute name identifier included in the attribute information to be matched corresponding to the header attribute column information and the target name similarity value as newly added attribute information to be matched; Adding the newly added attribute information to be matched as attribute information to be matched to the attribute information set to be matched for storage; The determined resource attribute information is sorted to obtain a resource attribute information sequence.
6. The method according to claim 1, wherein The detecting and processing of the resource attribute information sequence based on the preset key attribute information sequence to obtain the resource key attribute information sequence includes: Selecting resource attribute information that matches a preset key attribute information sequence from the resource attribute information sequence as target key resource attribute information to obtain a target key resource attribute information group; Determining the target key resource attribute information that meets the second preset similarity condition in the target key resource attribute information group as the resource key attribute information to obtain a resource key attribute information set; The resource key attribute information set is sorted to obtain a resource key attribute information sequence.
7. The method according to claim 1, wherein The target mode function information includes a mode identifier, first mode function information, second mode function information and third mode function information; as well as The matching process is performed on the dynamic resource information group and the preset resource inventory information table based on the target key attribute information and the target mode function information to obtain the matched resource information group, including: Determining the resource inventory information table, the target key attribute information, the target mode function information, and the dynamic resource information group as target subtask information, and adding the target subtask information to a pre-generated task queue of a sub-thread; In response to determining that the target subtask information satisfies a preset location condition, for each dynamic resource information in the dynamic resource information group included in the target subtask information, performing the following steps to generate matched resource information in the matched resource information group: Generate a mode attribute value based on the first mode function information, the target key attribute information included in the target subtask information, and the dynamic resource information; preprocessing the pattern attribute value based on the second pattern function information to obtain a target attribute value; Generate target resource inventory information based on the third mode function information, the target attribute value, the target key attribute information included in the target subtask information, and the resource inventory information table; In response to determining that the target resource list information meets a preset matching condition, the target resource list information and the dynamic resource information are determined as matched resource information.
8. A resource matching information generating device, comprising: a generating unit configured to, in response to receiving resource matching request information, generate a resource attribute information sequence and a resource detail information sequence based on the resource matching request information and a preset attribute information set to be matched, wherein the resource matching request information includes a user request identifier; a detection and processing unit configured to perform detection processing on the resource attribute information sequence based on a preset key attribute information sequence to obtain a resource key attribute information sequence; a splitting processing unit configured to split the resource detail information sequence to obtain a dynamic resource information group set; The execution unit is configured to execute the following steps for each dynamic resource information group in the dynamic resource information group set: Initialize the preset matching times to a preset value, and perform the following first resource information group generation step based on the dynamic resource information group: In response to determining that the matching number value satisfies a number threshold condition, determining target key attribute information and target pattern function information based on a preset pattern function information set, the matching number value, and the resource key attribute information sequence; Based on the target key attribute information and the target mode function information, matching the dynamic resource information group with a preset resource inventory information table to obtain a matched resource information group; In response to determining that the matched resource information group meets the preset attribute value condition, splitting the matched resource information group to obtain a first resource information group and a second resource information group; In response to determining that the second resource information group satisfies a preset attribute null value condition, updating a matching count value, and based on the updated matching count value, using the second resource information group as a dynamic resource information group and performing the first resource information group generating step again; The determining unit is configured to determine the user request identifier and each obtained first resource information group as resource matching information.
9. An electronic device comprising: 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 having a computer program stored thereon, wherein: When the program is executed by a processor, the method according to any one of claims 1 to 7 is implemented.
Citation Information
Patent Citations
Data information processing method and device, electronic equipment and storage medium
CN114490673A
Article display method and device, electronic equipment and computer readable medium
CN114692958A