Resource transfer data recording method and device, computer equipment, medium and product
By using mirrored resource units to concurrently execute resource transfer recording tasks in high-concurrency systems, the problems of resource contention and data corruption in high-concurrency systems are solved, and the accuracy and stability of high-concurrency resource transfer are achieved.
Patent Information
- Application Number
- CN202511136007.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-08-14
- Publication Date
- 2025-12-12
AI Technical Summary
In high-concurrency systems, existing technologies struggle to effectively handle frequent resource transfer requests, leading to resource contention conflicts, write blocking, and data corruption, which in turn affect system stability and data reliability.
By obtaining the mirror resource information of the target resource pool, the mirror resource unit is selected based on the feature fields and the resource transfer record task is executed concurrently. The logical equivalence of the mirror resource unit is used to distribute the write requests, avoiding concentration at the same resource pool entry point, thus achieving concurrent execution.
It effectively reduces the probability of write conflicts and improves the accuracy of record processing and system stability during high-concurrency resource transfer.
Smart Images

Figure CN121116992A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of big data, and in particular to a resource transfer data recording method and device, computer equipment, a computer readable storage medium and a computer program product. BACKGROUND
[0002] In a high-concurrency system, resource scheduling, transfer and recording operations widely exist in multiple typical technical scenarios such as distributed computing, cloud infrastructure management, task orchestration, permission resource allocation, virtual machine resource change, device state writing, etc. Especially when facing high-frequency resource transfer requests, high-concurrency resource writing, real-time state synchronization and other needs, the system needs to record the change process of the resource in an orderly, controllable and traceable manner to ensure data consistency, high performance of writing and recoverability in abnormal scenarios.
[0003] Related resource transfer recording methods mostly use single-point recording or centralized structures, which can still meet the requirements in low-concurrency or local use scenarios, but in actual running environments where resource hotspots are frequently concentrated and a large number of concurrent write requests are poured in, resource competition conflicts, write blocking and even data disordering problems are easily formed, which seriously affects the system stability and data reliability.
[0004] In related technologies, in order to solve the problem of high-concurrency resource writing, some systems try to introduce queue delay processing and other solutions, but these means often lack fine-grained concurrency processing capability for a single resource pool. Especially when the same resource unit is written by high-frequency requests, even through mechanism delay processing, it is difficult to completely get rid of the centralized writing bottleneck, and there are still problems such as data conflict in high-frequency requests, which makes the recording processing accuracy of high-concurrency resource transfer low. SUMMARY
[0005] Therefore, it is necessary to provide a resource transfer data recording method, device, computer equipment, computer readable storage medium and computer program product capable of improving the recording processing accuracy of high-concurrency resource transfer to solve the above technical problems.
[0006] In a first aspect, the present application provides a resource transfer data recording method, comprising:
[0007] In response to a resource transfer recording instruction, obtaining recording task information and corresponding to-be-recorded data of the recording task information; wherein the to-be-recorded data is process data for indicating resource flow transfer; the recording task information includes a resource pool identifier of a target resource pool;
[0008] In the case that any one of the hotspot identifier field and the risk identifier field of the resource pool identifier is in an enabled state, extracting at least one feature field from the recording task information;
[0009] acquire mirror resource information corresponding to the target resource pool, and select a mirror resource unit according to the feature field and the mirror resource information; each mirror resource unit of the target resource pool is configured to concurrently execute a resource transfer record task;
[0010] execute, by the mirror resource unit, a resource transfer record task corresponding to the record task information according to the to-be-recorded data.
[0011] In one of the embodiments, the method further comprises:
[0012] calculate a resource transfer frequency of a target resource pool indicated by the resource pool identifier within a preset sliding time window;
[0013] in a case where the resource transfer frequency exceeds a hotspot frequency threshold, set a hotspot identifier field to an enabled state to obtain a new resource pool identifier;
[0014] in a case where the resource transfer frequency does not exceed the hotspot frequency threshold, calculate a resource transfer error rate of the target resource pool indicated by the resource pool identifier within the preset sliding time window;
[0015] in a case where the resource transfer error rate exceeds a risk error rate threshold, set a risk identifier field to an enabled state to obtain a new resource pool identifier.
[0016] In one of the embodiments, the mirror resource information comprises mirror feature identifiers of each mirror resource unit corresponding to the target resource pool; and the selecting of the mirror resource unit according to the feature field and the mirror resource information comprises:
[0017] concatenate the feature field to obtain a task feature identifier;
[0018] in a case where the mirror resource information comprises the mirror feature identifier matching the task feature identifier, select a mirror resource unit corresponding to the mirror feature identifier;
[0019] in a case where the mirror resource information does not comprise the mirror feature identifier matching the task feature identifier, generate a new mirror resource unit, set the task feature identifier as a mirror feature identifier of the new mirror resource unit, and set the new mirror resource unit as the selected mirror resource unit.
[0020] In one of the embodiments, the mirror resource information further comprises a mirror index table; the mirror index table is used to record the mapping relationship between each of the mirror resource units and the historical record task information; before the resource transfer record task corresponding to the record task information is executed by the mirror resource unit according to the to-be-recorded data, the method further comprises:
[0021] According to the selected mirror resource unit and the record task information, the mirror index table is updated;
[0022] According to the mirror index table, data consistency check is performed on each of the mirror resource units corresponding to the target resource pool, and in the case that the data consistency check is passed, the step of executing the resource transfer record task corresponding to the record task information by the mirror resource unit according to the to-be-recorded data is performed.
[0023] In one of the embodiments, the data consistency check according to the mirror index table on each of the mirror resource units corresponding to the target resource pool comprises:
[0024] In response to a consistency check instruction, a to-be-checked field and a reference field value of the to-be-checked field at a checking time are obtained;
[0025] According to the mirror index table, the mirror resource unit associated with the to-be-checked field is searched, and the field value of the to-be-checked field in the mirror resource unit is compared with the reference field value to obtain a consistency check result;
[0026] In the case that the consistency check results of all the to-be-checked fields associated with the target resource pool are passed, it is determined that the data consistency check is passed.
[0027] In one of the embodiments, the record task information further comprises a record task parameter; the method further comprises:
[0028] In the case that the hotspot identifier field and the risk identifier field of the resource pool identifier are in the un-enabled state, the record task type is determined according to the record task parameter;
[0029] In the case that the record task type is a single detailed type, the resource transfer record task corresponding to the record task information is executed for the target resource pool according to the to-be-recorded data and the resource pool identifier;
[0030] In a case where the record task type is the summary detail type, a summary time period is acquired, the to-be-recorded data of the target resource pool in the summary time period is added to a summary detail set, and a resource transfer record task corresponding to the record task information is executed for the target resource pool according to the summary detail set.
[0031] In a second aspect, the present application further provides a resource transfer data recording device, comprising:
[0032] A data acquisition module is configured to acquire record task information and to-be-recorded data corresponding to the record task information in response to a resource transfer record instruction; wherein the to-be-recorded data is process data for indicating resource flow; and the record task information comprises a resource pool identifier of a target resource pool.
[0033] A feature extraction module is configured to extract at least one feature field from the record task information in a case where any one of a hotspot identifier field and a risk identifier field of the resource pool identifier is in an enabled state.
[0034] A data processing module is configured to acquire mirror resource information corresponding to the target resource pool, and select a mirror resource unit according to the feature field and the mirror resource information; wherein each mirror resource unit of the target resource pool is configured to concurrently execute a resource transfer record task.
[0035] A data recording module is configured to execute a resource transfer record task corresponding to the record task information by using the mirror resource unit according to the to-be-recorded data.
[0036] In an embodiment, the device further comprises:
[0037] A frequency analysis module is configured to calculate a resource transfer frequency of a target resource pool indicated by the resource pool identifier within a preset sliding time window; and set a hotspot identifier field to an enabled state to obtain a new resource pool identifier in a case where the resource transfer frequency exceeds a hotspot frequency threshold.
[0038] A risk identification module is configured to calculate a resource transfer error rate of the target resource pool indicated by the resource pool identifier within the preset sliding time window in a case where the resource transfer frequency does not exceed the hotspot frequency threshold; and set a risk identifier field to an enabled state to obtain a new resource pool identifier in a case where the resource transfer error rate exceeds a risk error rate threshold.
[0039] In one of the embodiments, the mirror resource information includes mirror feature identifiers of each mirror resource unit corresponding to the target resource pool; the data processing module is specifically configured to splice the feature fields to obtain a task feature identifier; in the case that the mirror resource information includes the mirror feature identifier matching the task feature identifier, select the mirror resource unit corresponding to the mirror feature identifier; in the case that the mirror resource information does not include the mirror feature identifier matching the task feature identifier, generate a new mirror resource unit, take the task feature identifier as the mirror feature identifier of the new mirror resource unit, and take the new mirror resource unit as the selected mirror resource unit.
[0040] In one of the embodiments, the mirror resource information further includes a mirror index table; the mirror index table is used to record the mapping relationship between each mirror resource unit and historical record task information; the data recording module is further configured to update the mirror index table according to the selected mirror resource unit and the record task information; perform data consistency check on each mirror resource unit corresponding to the target resource pool according to the mirror index table, and in the case that the data consistency check is passed, execute the step of executing the resource transfer recording task corresponding to the record task information through the mirror resource unit according to the to-be-recorded data.
[0041] In one of the embodiments, the data recording module is specifically configured to: in response to a consistency check instruction, acquire a to-be-checked field and a reference field value of the to-be-checked field at a checking time; according to the mirror index table, find the mirror resource unit associated with the to-be-checked field, and compare the field value of the to-be-checked field in the mirror resource unit with the reference field value to obtain a consistency check result; in the case that the consistency check results of all the to-be-checked fields associated with the target resource pool are all passed, determine that the data consistency check is passed.
[0042] In one of the embodiments, the record task information further includes record task parameters; the apparatus further includes a parameter analysis module configured to: in the case that the hotspot identifier field and the risk identifier field of the resource pool identifier are both in the unenabled state, determine a record task type according to the record task parameters; in the case that the record task type is a single-pen detail type, execute the resource transfer recording task corresponding to the record task information for the target resource pool according to the to-be-recorded data and the resource pool identifier; in the case that the record task type is a summary detail type, acquire a summary time period, add the to-be-recorded data of the target resource pool in the summary time period to a summary detail set, and execute the resource transfer recording task corresponding to the record task information for the target resource pool according to the summary detail set.
[0043] In a third aspect, the present application provides a computer device, comprising a memory and a processor, wherein the memory stores a computer program, and the processor implements the following steps when executing the computer program:
[0044] In response to a resource transfer recording instruction, obtaining recording task information and to-be-recorded data corresponding to the recording task information; wherein the to-be-recorded data is process data used to represent resource flow; and the recording task information comprises a resource pool identifier of a target resource pool;
[0045] In a case where any one of a hotspot identifier field and a risk identifier field of the resource pool identifier is in an enabled state, extracting at least one feature field from the recording task information;
[0046] Obtaining mirror resource information corresponding to the target resource pool, and selecting a mirror resource unit according to the feature field and the mirror resource information; wherein each mirror resource unit of the target resource pool is used to concurrently execute a resource transfer recording task;
[0047] According to the to-be-recorded data, executing the resource transfer recording task corresponding to the recording task information by using the mirror resource unit.
[0048] In a fourth aspect, the present application provides a computer readable storage medium, which stores a computer program, and the computer program is executed by a processor to implement the following steps:
[0049] In response to a resource transfer recording instruction, obtaining recording task information and to-be-recorded data corresponding to the recording task information; wherein the to-be-recorded data is process data used to represent resource flow; and the recording task information comprises a resource pool identifier of a target resource pool;
[0050] In a case where any one of a hotspot identifier field and a risk identifier field of the resource pool identifier is in an enabled state, extracting at least one feature field from the recording task information;
[0051] Obtaining mirror resource information corresponding to the target resource pool, and selecting a mirror resource unit according to the feature field and the mirror resource information; wherein each mirror resource unit of the target resource pool is used to concurrently execute a resource transfer recording task;
[0052] According to the to-be-recorded data, executing the resource transfer recording task corresponding to the recording task information by using the mirror resource unit.
[0053] In a fifth aspect, the present application provides a computer program product, comprising a computer program, and the computer program is executed by a processor to implement the following steps:
[0054] in response to the resource transfer record instruction, obtaining record task information and to-be-recorded data corresponding to the record task information; wherein the to-be-recorded data is process data used to represent resource flow transfer; and the record task information includes a resource pool identifier of a target resource pool;
[0055] in a case where any one of a hotspot identifier field and a risk identifier field of the resource pool identifier is in an enabled state, extracting at least one feature field from the record task information;
[0056] obtaining mirror resource information corresponding to the target resource pool, and selecting a mirror resource unit according to the feature field and the mirror resource information; wherein each mirror resource unit of the target resource pool is used to concurrently execute a resource transfer record task;
[0057] executing, according to the to-be-recorded data, the resource transfer record task corresponding to the record task information by using the mirror resource unit.
[0058] The resource transfer data record method, device, computer device, computer readable storage medium and computer program product can, in response to a resource transfer record instruction, obtain record task information and to-be-recorded data corresponding to the record task information, the to-be-recorded data is process data used to represent resource flow transfer, and the record task information includes a resource pool identifier of a target resource pool, so that the attribution target of resource writing can be determined. In a case where any one of a hotspot identifier field and a risk identifier field of the resource pool identifier is in an enabled state, it is identified that the target resource pool has high concurrent pressure or data abnormality risk, at least one feature field is extracted from the record task information, a mirror resource unit is selected according to the feature field and the mirror resource information, each mirror resource unit of the target resource pool is used to concurrently execute a resource transfer record task, each mirror resource unit has a same source structure and logical equivalence, can process writing tasks respectively without causing semantic deviation, and has concurrent execution capability. According to the to-be-recorded data, the resource transfer record task corresponding to the record task information is executed by using the mirror resource unit, so that a large number of concentrated writing requests can be dispersed into multiple mirror sub-paths, all change pressures can be avoided from being concentrated at a same resource pool entrance, writing conflict probability can be effectively reduced, and record processing accuracy of high-concurrent resource transfer is improved. BRIEF DESCRIPTION OF DRAWINGS
[0059] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the related art, the following will briefly introduce the drawings needed to be used in the description of the embodiments of the present application or the related art. Obviously, the drawings in the following description are only some embodiments of the present application, and for those skilled in the art, other related drawings can also be obtained from these drawings without creative labor.
[0060] Figure 1 An application environment diagram of the resource transfer data record method in one embodiment;
[0061] Figure 2 A flowchart of the resource transfer data record method in one embodiment;
[0062] Figure 3 A flowchart of the resource transfer data record method about the mirror index table in one embodiment;
[0063] Figure 4 A flowchart of step S206 in one embodiment;
[0064] Figure 5 A flowchart of the resource transfer data record method in another embodiment;
[0065] Figure 6 A structural block diagram of the resource transfer data record device in one embodiment;
[0066] Figure 7 An internal structure diagram of the computer device in one embodiment. DETAILED DESCRIPTION
[0067] In order to make the purpose, technical solutions and advantages of the present application more clear, the following will further describe the present application in combination with the drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application, and are not used to limit the present application. It should be noted that in the embodiments of the present application, some software, groups, models and other industry existing schemes may be mentioned, which should be considered as exemplary, and the purpose is only to illustrate the feasibility of the implementation of the technical solutions of the present application, but it does not mean that the applicant has or will necessarily use the scheme.
[0068] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data for analysis, stored data, displayed data, etc.) involved in the present application are all information and data authorized by the user or authorized by all parties, and the collection, use and processing of related data need to comply with relevant regulations. The acquisition, storage, use, processing and other data in the technical solutions of the present application comply with the relevant regulations of national laws and regulations.
[0069] The resource transfer data recording method provided by the embodiments of the present application can be applied to the application environment as shown in Figure 1 The terminal 102 communicates with the server 104 through the network. The terminal 102 can be configured to receive a resource transfer recording instruction, and send the received recording task information and the to-be-recorded data corresponding to the recording task information to the server 104. The terminal 102 can also be configured to receive the data processing result of the server 104, and display the recording result of the resource transfer data. The data storage system can store the data required to be processed by the server 104. The data storage system can be integrated on the server 104, or placed on a cloud or other network server. The data storage system can be configured to store the recording task information and the to-be-recorded data, and also be configured to store the resource pool identifier of each resource pool and the related data of the historically generated mirror resource unit. The server 104 can store the to-be-recorded data in the data storage system according to the data processing result after data processing. The terminal 102 can be, but is not limited to, various personal computers, notebook computers, smart phones, tablet computers, Internet of Things devices and portable wearable devices. The Internet of Things device can be a smart speaker, a smart television, a smart air conditioner, a smart vehicle device, a projection device, etc. The portable wearable device can be a smart watch, a smart bracelet, a head-mounted device, etc. The head-mounted device can be a virtual reality (VR) device, an augmented reality (AR) device, smart glasses, etc. The server 104 can be a stand-alone physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server providing cloud computing services.
[0070] In an exemplary embodiment, as shown in Figure 2 A resource transfer data recording method is provided. The method is applied to the server 104 in Figure 1 for example, and includes the following steps S202 to S206. Wherein:
[0071] In step S202, in response to a resource transfer recording instruction, recording task information and to-be-recorded data corresponding to the recording task information are obtained.
[0072] The record task information includes a resource pool identifier of the target resource pool. The record task information refers to a parameter set for describing the resource flow task, which includes but is not limited to a unique identifier of the target resource pool (the resource pool identifier), an operation source identifier, a request task number, a priority label, and a timestamp, etc. The resource pool identifier is used to uniquely determine the target resource unit to which the current resource flow write should belong. In a distributed environment, it can represent a certain logical resource pool, a physical node set, a virtual resource container, or a resource subdomain defined for a business dimension. For example, when a certain load task in a cloud container platform is migrated from node A to node B, the corresponding resource pool identifier in the record task information can represent the container resource pool number corresponding to the migration target node.
[0073] The to-be-recorded data is process data used to represent resource flow, which is the minimum description unit of resource state change and can include resource type, change direction, resource magnitude, change reason, operation time, etc. For example, in a resource scheduling system, if a certain computing task switches the running load from GPU (Graphics Processing Unit) resource pool A to GPU resource pool B, the to-be-recorded data can describe the release and allocation operation of the GPU quota this time, including resource change value (such as releasing 3 units and allocating 5 units), corresponding time period, scheduling strategy source, etc.
[0074] Exemplarily, the resource transfer record instruction refers to a standardized operation instruction used to trigger a resource flow state write behavior in the system. The instruction can be initiated by an upstream resource arrangement system, a scheduling middleware, or an automatic task execution engine, and the triggering can be based on scenarios such as periodic resource allocation, event-triggered resource migration, resource transfer in node failure, etc.
[0075] Exemplarily, the server 104 can parse the protocol structure in the resource transfer record instruction, extract the task description part to form record task information, and synchronously parse the to-be-recorded data, complete the structured modeling of the entire record request, and then the server 104 can identify and archive the resource pool identifier field in the record task information. In this process, the server 104 can also perform preliminary caching processing on the record task information to ensure that the task context can be quickly accessed in subsequent steps, and establish an initial version number according to the initiation time of the record task. For example, if a resource scheduling system needs to record the data transmission record of an edge computing task, the task is migrated from the device cluster E01 to the cluster E03, the server 104 can receive the resource transfer record instruction which contains the resource pool identifier "E03", indicating that the resource writing target unit is the resource pool where E03 is located. At the same time, the to-be-recorded data will describe the resource data block ID, transmission rate, start and end time, transmission protocol type and other fields contained in this migration. Through the execution of this step, the server 104 completes the reception and semantic deconstruction of the resource transfer instruction, and forms a record task data structure that can be recognized, tracked and further executed by the program.
[0076] In step S204, at least one feature field is extracted from the record task information if any of the hotspot identifier field and the risk identifier field of the resource pool identifier is in the enabled state.
[0077] The state of the hotspot identifier field can be used to indicate the resource transfer frequency of the target resource pool. Specifically, the hotspot identifier field can indicate whether the resource transfer request frequency of the target resource pool in the current time window exceeds the system-defined high concurrency threshold. In analyzing this field, the server 104 can combine statistical analysis of resource transfer records of the resource pool in a period of time, such as whether the number of resource flow transfer instructions received in a unit of time is continuously higher than the upper limit of average processing capacity, or whether multiple sub-threads simultaneously access the same resource pool. When the server 104 finds that the value of this field is in the enabled state, it means that the resource pool is currently experiencing significant resource flow transfer pressure and belongs to a high-concurrency hotspot unit.
[0078] The risk identification field is used to reflect the resource transfer failure rate or abnormal rate of the target resource pool in the recent period of time, and its state can be calculated according to the write error condition counted by the system. The server 104 can count the total number of write errors in the same resource pool associated with the resource transfer write operation in a dynamic time window, and calculate the resource transfer error rate with the total number of write operations. If the error rate exceeds the system tolerance threshold (for example, 5% or 10%), the server 104 can set the risk identification field to the enabled state. Through this mechanism, the server 104 can dynamically identify those resource pools that have consistency risks due to architectural bottlenecks or historical abnormalities, even if the current concurrency frequency is not high, and trigger fault tolerance strategies in advance.
[0079] Exemplarily, once the server 104 determines that any of the hotspot identification field and the risk identification field is in the enabled state, it is considered that the resource pool has concurrency pressure or consistency risk, and the subsequent mirror resource unit shunting strategy needs to be started. The server 104 can extract at least one feature field from the record task information for subsequent mirror unit matching. The feature field refers to a context field that can effectively characterize the resource transfer task feature and facilitate the system to make mirror selection decisions.
[0080] Exemplarily, the server 104 can preferentially select information such as resource type field (such as CPU, memory, network bandwidth), source node ID, target node ID, operation type (migration, replacement, expansion, etc.), scheduling policy ID, initiator identity, etc. as the feature field source. For example, in a task describing "GPU resources are scheduled from edge node E01 to center node E03", the server 104 can select "resource type: GPU", "source node: E01" and "scheduling policy: emergency migration" as the feature field combination to identify the uniqueness of the task and assist routing.
[0081] Through the above steps, the server 104 can not only determine whether the target resource pool is in a high-risk or high-load state in real time, but also quickly extract key discriminant features for task shunting when abnormal or congestion risk is triggered, ensuring that the server 104 has the system capability of hotspot identification and path shunting before executing the write task, thereby significantly improving the dynamic processing flexibility and stability of the system when facing concurrent resource requests.
[0082] Exemplarily, the server 104 can calculate the resource transfer frequency of the target resource pool indicated by the resource pool identifier within a preset sliding time window; in the case that the resource transfer frequency exceeds a hotspot frequency threshold, set the hotspot identifier field to an enabled state to obtain a new resource pool identifier; in the case that the resource transfer frequency does not exceed the hotspot frequency threshold, calculate the resource transfer error rate of the target resource pool indicated by the resource pool identifier within the preset sliding time window; in the case that the resource transfer error rate exceeds a risk error rate threshold, set the risk identifier field to an enabled state to obtain a new resource pool identifier. For example, if the resource pool E03 has continuously accepted 200 resource write instructions in the past 30 seconds, and 12 of them have failed due to concurrent conflicts, the server 104 can set the hotspot identifier and the risk identifier of the pool to the enabled state. When the next resource transfer request arrives, the server 104 can recognize the enabled state and immediately extract the three feature fields of the record task, i.e., “resource type = GPU”, “source node = E01”, and “scheduling strategy = high priority”, to ensure that the system can automatically adjust the traffic path, relieve resource conflicts, and guarantee write correctness even in an extremely high-concurrent situation.
[0083] In step S206, the mirror resource information corresponding to the target resource pool is obtained, and the mirror resource unit is selected according to the feature field and the mirror resource information.
[0084] The mirror resource unit of the target resource pool is used to concurrently execute the resource transfer record task.
[0085] Exemplarily, the server 104 can obtain the mirror resource information corresponding to the target resource pool identifier from the storage structure. The mirror resource information can be generated and maintained dynamically by the system in the initial deployment stage or after a high-concurrent request occurs to the resource pool. The mirror resource information can record the state information, path structure, load distribution, version record, etc. of all mirror resource units constructed under the current resource pool, with the resource pool identifier as the index. Each mirror resource unit can be essentially a copy structure of the target resource pool at the logical or physical level. Each mirror resource unit has logical consistency and independent resource transfer write channels and cache structures, and can independently undertake and execute specific write tasks without interfering with the core structure of the main resource pool.
[0086] Exemplarily, after obtaining the mirror resource information, the server 104 can traverse all available mirror resource units under the resource pool and match and compare the feature fields extracted in the previous step with the structural description information of the mirror units. This matching process can adopt various strategies such as weight calculation, feature hashing, modulus mapping, range division, etc. For example, if the server 104 can extract the feature field as source node = E01, the node hashing mapping strategy can be adopted, that is, the node name is subjected to consistent hashing operation and falls into the specified mirror unit interval, so as to automatically match the mirror resource unit numbered as “Mirror_03”. For another example, when the feature field is “resource type = GPU” and “operation strategy = emergency migration”, the server 104 can preferentially route to the mirror unit registered as a high-performance processing type, such as “Mirror_GPU_FastWrite” specially constructed for GPU transfer tasks.
[0087] It is worth noting that these mirror resource units are not completely isolated from each other, but share the same meta-information base, structural rules and consistency version control protocol of the resource pool, but each mirror unit has an independent write path, task buffer and error tolerance strategy, allowing multiple tasks to be executed concurrently in different units without affecting each other. For example, a hot resource pool can be divided into 8 mirror resource units numbered from Mirror_00 to Mirror_07. When performing mirror selection, the server 104 can quickly locate the shunt target according to the feature field hash value mod 8 strategy, so as to avoid lock conflicts caused by centralized writing to the same unit.
[0088] Further, after completing the selection of the mirror unit, the server 104 can load the address information, path ID, receiving queue number, etc. of the mirror resource unit into the current task context, and establish a binding relationship between the task and the mirror unit. This binding relationship will be consistent throughout the life cycle of the record task, ensuring that subsequent write, verification, version marking, etc. operations are all applied to the same mirror path, avoiding the problem of path drift or write misplacement.
[0089] For example, if the resource pool “E03” currently has 4 mirror resource units, Mirror_A, Mirror_B, Mirror_C, and Mirror_D, the server 104 receives a resource transfer record task with the feature fields “task type = heterogeneous resource allocation” and “target architecture = ARM”, and can route the task to Mirror_C according to the pre-registered mirror label. This mirror unit has a cache structure and compression write strategy optimized for ARM resource allocation, thereby improving record efficiency and reducing conflict probability.
[0090] Through the above steps, the server 104 can use the feature field to accurately select multiple mirror resource units under the target resource pool, ensure that each resource transfer record can be routed to a mirror substructure with independent processing capability, thereby improving the throughput and anti-collision capability of the overall system, realizing the structured dispersion of the write pressure in the hot resource pool, enabling multiple resource transfer record tasks to be concurrently executed in different mirror resource units, minimizing resource lock contention, write congestion, and abnormal retry probability, thereby having high concurrent anti-pressure capability and dynamic shunting strategy adapting to multiple feature fields.
[0091] Step S208, according to the to-be-recorded data, performing a resource transfer record task corresponding to the record task information through the mirror resource unit.
[0092] Exemplarily, the server 104 can load the to-be-recorded data generated in the previous steps into the input buffer corresponding to the mirror resource unit. The to-be-recorded data can be a structured description of resource flow behavior, and can include resource ID, resource type, starting node and target node, change direction, resource level, task number, request timestamp, scheduling policy label, etc. These fields can collectively constitute a resource operation semantic chain, indicating the expected record target of the system for a certain resource state change.
[0093] Subsequently, the server 104 can call the write interface of the mirror resource unit to perform the resource record operation of the task. This operation is not a simple data write, but a standardized record processing process around the resource state change, which can specifically involve the following sub-stages:
[0094] First, the server 104 can load a resource state template based on the resource type field to standardize how the change should be structured. For example, for the "heterogeneous GPU resource allocation" task, the server 104 will load a structure template containing GPU core type, memory capacity, current load ratio, etc. to ensure the field integrity and semantic consistency of the record data.
[0095] Next, the server 104 can determine whether the resource flow is "resource release" or "resource occupation" according to the change direction in the to-be-recorded data, and call the corresponding operation sub-module in the mirror resource unit. For the release operation, the server 104 can execute a "resource state release" instruction in the mirror structure to release the resource unit previously marked as "in use" to the "idle" state; and for the occupation operation, the target resource block is updated to the "locked" state, and the identification and version number of the record task are associated, so as to facilitate subsequent version tracking and verification.
[0096] In the actual writing process, the server 104 can also write auxiliary information at the same time, such as the requestor number associated with the current resource state change, the writing timestamp, the resource snapshot digest (such as the hash value), and other metadata. These data can be used for subsequent consistency verification, conflict detection and compensation judgment, to ensure that the writing path has complete operation traceability.
[0097] When the mirror resource unit successfully completes the writing operation of the to-be-recorded data, the server 104 can trigger the operation flow update of the mirror path, and append the execution action of the current task to the change history linked list of the mirror resource. This linked list records the time sequence of the resource writing tasks that have occurred on each mirror unit, which is used for subsequent analysis of path consistency, execution efficiency, conflict hotspots and the like. For example, in a cross-regional resource scheduling task, the to-be-recorded data describes “migrate the GPU resource numbered G23 on the edge node E01 to the data center node E03 at 10:45”. The server 104 can write the data to the mirror resource unit Mirror_C. During the writing process, the resource state of G23 can be marked from “E01_occupied” to “E03_occupied”, and a timestamp, a task number and a snapshot digest can be appended; after the writing is successful, the behavior will be appended to the change linked list of Mirror_C, which is used for subsequent verification and consistency comparison.
[0098] Through the above steps, the server 104 realizes precise recording of the resource state without directly operating the main resource pool structure. Since all recording tasks are executed concurrently in independent mirror resource units, the system can avoid the lock competition and writing congestion problems caused by traditional centralized writing, thereby greatly improving the response speed of the system to high-frequency resource change requests.
[0099] In the resource transfer data recording method, in response to a resource transfer recording instruction, by obtaining recording task information and corresponding to-be-recorded data of the recording task information, the to-be-recorded data is process data used to indicate resource flow transfer, and the recording task information includes a resource pool identifier of a target resource pool, so that the attribution target of resource writing can be determined. In the case that any one of a hotspot identifier field and a risk identifier field of the resource pool identifier is in an enabled state, it is identified that the target resource pool has high concurrent pressure or data abnormality risk. Then, at least one feature field is extracted from the recording task information. By obtaining mirror resource information corresponding to the target resource pool, a mirror resource unit is selected according to the feature field and the mirror resource information. Since each mirror resource unit of the target resource pool is used to concurrently execute a resource transfer recording task, each mirror resource unit has a homologous structure and logical equivalence, and can process a writing task respectively without causing semantic deviation, so that concurrent execution capability is formed. Then, according to the to-be-recorded data, a resource transfer recording task corresponding to the recording task information is executed by the mirror resource unit, so that a large number of concentrated writing requests can be dispersed into multiple mirror sub-paths, avoiding concentrating all change pressures at the same resource pool entrance, effectively reducing the writing conflict probability, and improving the recording processing accuracy of high-concurrent resource transfer.
[0100] In one exemplary embodiment, as shown in FIG. 3, step S208 can further include steps S302 to S306. Wherein: Figure 3
[0101] Step S302, according to the selected mirror resource unit and recording task information, updating the mirror index table.
[0102] Wherein, the mirror resource information further includes a mirror index table; the mirror index table is used to record the mapping relationship between each mirror resource unit and historical recording task information; the server 104 can extract key fields from the task context of the executed writing operation, including but not limited to recording task identifier (such as task serial number, source node ID, resource identifier, etc.) and unique identifier of the target mirror resource unit (such as mirror number, path ID, etc.). Then, the server 104 can call the mirror index table submodule embedded in the mirror resource information structure. The index table is a dynamic mapping table for resource transfer recording tasks, and is used to record the historical binding relationship between the recording task information and the mirror resource unit.
[0103] Exemplarily, the server 104 can take the record task identification as the primary key, write the currently bound mirror resource unit address, write time, version number, execution path, resource ID and other information into the newly created entry of the mirror index table. For example, for the record task "Task_89", the server 104 can register the entry as: "Task_89 is registered to Mirror_C, version number = V15, resource ID = G23, write time = 11:42:36". This structured record not only can be quickly searched and used by the subsequent consistency comparison step, but also can be used as data reference when the system performs copy correction, task tracing and scheduling optimization.
[0104] In addition, the server 104 can also introduce supplementary fields such as "verification state", "replay flag", "whether it is a target write type" and other labels for the mirror index table, so that the index table has the ability to describe the behavior attributes in addition to the basic data. Through the above steps, the mirror index table not only bears the simple mapping function, but also becomes an important information hub for multi-dimensional state analysis of the system. For example, if there are 6 transfer tasks generated in resource pool E03 in a high concurrency period, the server 104 can allocate Mirror_A, Mirror_B, Mirror_C and Mirror_C four mirror paths for four of them, and record them in the mirror index table in turn, which provides a clear data source for subsequent identification of which mirror has concentrated write pressure and which mirror repeatedly appears abnormal.
[0105] Through the implementation of this step, the server 104 can realize the structured management of the complex path execution history under the high concurrency environment, and further provide a clear write path traceable channel for the system, greatly improving the self-diagnosis and self-correction ability of the system.
[0106] In step S304, according to the mirror index table, the data consistency of each mirror resource unit corresponding to the target resource pool is verified, and in the case that the data consistency verification is passed, the step of executing the resource transfer record task corresponding to the record task information according to the to-be-recorded data through the mirror resource unit is executed.
[0107] Exemplarily, the server 104 can respond to the consistency verification instruction, obtain the to-be-verified field and the reference field value of the to-be-verified field at the verification time; according to the mirror index table, find the mirror resource unit associated with the to-be-verified field, and compare the field value of the to-be-verified field in the mirror resource unit with the reference field value to obtain the consistency verification result; in the case that the consistency verification results of all to-be-verified fields associated with the target resource pool are all passed, it is determined that the data consistency verification is passed.
[0108] Exemplarily, the server 104 can ensure that the data semantics recorded in all mirror structures remain consistent and that the state of the same resource is not inconsistent in different paths in the case that there are multiple parallel mirror write paths under the resource pool. To achieve this purpose, the server 104 can enter a consistency check process according to a system scheduling strategy or a trigger instruction. The server 104 can read all record entries associated with the current target resource pool in the mirror index table, and identify the set of mirror resource units that need to be checked currently. For example, the server 104 finds that the latest five record tasks of “resource pool E03” are written to Mirror_A, Mirror_B, and Mirror_C, which are three different paths, and these paths are the current consistency check targets.
[0109] Subsequently, the server 104 can extract the fields to be checked for each record task. These fields can include resource state (such as “occupied” and “released”), resource location (such as “node number”), task number, timestamp, operation type, and other key semantic information. Taking resource ID=G23 as an example, the fields to be checked can be: “current state=occupied”, “target node=E03”, and “version number=V15”.
[0110] Next, the server 104 can find all mirror units associated with the field from the mirror index table, and read the real-time value of the current field from each unit. For example, the server 104 can read the state of resource G23 from Mirror_A as “occupied_E03”, and the version number as “V15”; read from Mirror_C as “released_E01”, and the version number as “V14”, and can determine that the two paths have version inconsistency or resource state conflict.
[0111] In some embodiments, only when the values of all fields to be checked in all paths are consistent with the reference values, the server 104 can determine that the consistency check is passed, otherwise the system automatically enters the compensation processing stage. In this process, the server 104 can also introduce lightweight hash check, version stamp comparison, timestamp tolerance analysis, and other mechanisms to speed up the determination and improve fault tolerance. For example, the server 104 finds that Mirror_A and Mirror_C write consistent data on the same task, but Mirror_B is not updated or updated incorrectly when checking the resource pool E03, and then can select a trusted path according to the task priority, write time, or set weight, and mark Mirror_B to enter the repair state. If all mirror unit data is consistent, a check pass label is recorded, and the subsequent data warehousing or copy merging stage is allowed to enter.
[0112] Through the above steps, the server 104 can build a set of dynamically controllable write consistency guarantee protocols on the basis of accurate merging after multiple path split writes. It not only supports collaborative consistency verification between mirror structures, but also adapts to complex path dynamic change scenarios, significantly reduces the implicit data inconsistency risk caused by concurrent writes, and thus ensures stable operation of high-concurrency systems, clear data semantics, and complete historical records.
[0113] In an exemplary embodiment, as shown in Figure 4 Step S206 can include steps S402 to S406. Among them:
[0114] Step S402, the feature fields are spliced to obtain a task feature identifier.
[0115] Exemplarily, after completing the identification of resource pool hotspot identification or risk identification and extracting a plurality of feature fields related to the record task, the server 104 can perform a unified format splicing operation on the plurality of feature fields extracted in the previous steps, thereby generating a structured task feature identifier. These feature fields can include resource type (such as CPU / GPU), requester identifier, scheduling level, operation type, priority label, time window number, resource level label, and the like. The combination of these fields represents the unique feature signature of the resource record task in terms of semantics, which is used to determine whether there is a suitable mirror resource structure that can handle tasks with similar characteristics.
[0116] For example, the feature fields of a certain record task are as follows: resource type = GPU, requester identifier = node D12, scheduling level = high, operation type = cross-domain migration, and the server 104 can splice them into a task feature identifier: "GPU|D12|HIGH|cross-domain migration". This splicing uses a uniform separator and a fixed field order, which not only facilitates subsequent quick table lookup, but also ensures semantic interpretability.
[0117] It is worth noting that the purpose of the server 104 splicing the feature fields is to avoid path drift or inconsistency problems caused by fuzzy matching, and requires strict matching of the task feature identifier and the mirror feature identifier, i.e. only when all field contents are consistent, can it be considered that the two are matched successfully. That is, even if the tasks are of the same resource type, if the requesters are different or the operation types are different, they will not be incorrectly routed to the same mirror resource path, ensuring path independence and the specificity of processing behavior.
[0118] Step S404, in the case where there is a mirror feature identifier in the mirror resource information that matches the task feature identifier, selecting the mirror resource unit corresponding to the mirror feature identifier.
[0119] Exemplarily, the server 104 can take the task feature identifier as a lookup keyword to retrieve all registered mirror feature identifiers in the mirror resource information structure. The mirror feature identifier is automatically generated and bound by the system when a new mirror resource unit is created each time, and is used to identify the specific feature task handled by the mirror unit. If the server 104 finds that the current task feature identifier is completely consistent with a mirror feature identifier, for example, “GPU|D12|HIGH|cross-domain migration” exactly corresponds to the existing Mirror_M1 mirror resource unit, the server 104 can directly select the mirror resource unit as the execution target and update the path binding information in the task context.
[0120] In step S406, if there is no mirror feature identifier in the mirror resource information that matches the task feature identifier, a new mirror resource unit is generated, the task feature identifier is taken as the mirror feature identifier of the new mirror resource unit, and the new mirror resource unit is taken as the selected mirror resource unit.
[0121] Exemplarily, when there is no mirror path in the system that completely matches the current task feature identifier, the server 104 can trigger the dynamic construction process of the mirror resource unit. The server 104 can create a new mirror resource unit structure under the current resource pool according to the available quota of the resource pool, and register the current task feature identifier as the mirror feature identifier of the mirror unit in the mirror resource information structure.
[0122] For example, there is no mirror path in the current resource pool E07 that matches “GPU|D12|HIGH|cross-domain migration”, and the server 104 can construct a new Mirror_M5 unit in E07 and complete the following registration: “Mirror_M5: feature identifier = GPU|D12|HIGH|cross-domain migration”. The mirror unit can then be taken as the execution path of the current recorded task, and the configuration of its initialization state, cache area, synchronization flag and other structures is completed. In the case that the resource quota of the resource pool E07 has been exhausted, the server 104 can also detect the mirror distribution of other available resource pools in the same resource area, and evaluate whether the mirror unit can be initialized in other resource pools according to the consistency of resource types, geographical location delay, load condition and other dimensions. For example, in the case that the resource of E07 is insufficient, the server 104 can apply for mirror space to the adjacent resource pool E09, and construct the “Mirror_M5(E09)” mirror unit in E09. Subsequently, the path migration identifier “original resource pool = E07; execution path resource pool = E09” is added in the mirror index table, which is used for subsequent consistency management and record of copy merging.
[0123] Exemplarily, a resource record task hopes to record "high-priority migration of GPU resources by node D12", the server 104 can splice the task feature identifier as "GPU|D12|HIGH|cross-domain migration", and find that the existing Mirror_M1 matches the feature identifier in the mirror resource information, that is, the task is routed to Mirror_M1 for processing; if there is no matching mirror, and the E07 resource is sufficient, then create Mirror_M5, register the feature; if the E07 resource is insufficient, build Mirror_M5 (E09) to E09 and continue the task processing.
[0124] Through the above steps, the server 104 not only realizes the fine shunting and behavior isolation of the task path, but also constructs an extensible and self-organizing mirror execution structure network, greatly improves the processing capacity and path autonomy of the system for sudden and high-heterogeneous concurrent resource record tasks, avoids resource conflicts or record abnormalities caused by path sharing, and thus provides higher-dimensional stability and innovative guarantee on the system structure.
[0125] In an exemplary embodiment, as shown in Figure 5 If the hotspot identifier field and the risk identifier field of the target resource pool are both in the unenabled state for a normal record task, such a task does not involve high-frequency concurrent conflicts or abnormal fluctuation risks, and therefore does not need to trigger the mirror resource path mechanism, but after determining the record type by the task parameter, the resource transfer record operation is completed by directly entering the pool. The above method can further include steps S502 to S506. Among them:
[0126] Step S502, in the case that the hotspot identifier field and the risk identifier field of the resource pool identifier are both in the unenabled state, determining the record task type according to the record task parameter.
[0127] Exemplarily, the server 104 can check the state field of the target resource pool. The hotspot identifier field indicates whether the resource transfer frequency of the resource pool reaches the concurrency threshold in a period of time; the risk identifier field indicates whether the resource pool has a problem of too high record failure rate or verification exception. When the server 104 finds that both the identifier fields are in the unenabled state, that is, the current resource pool is in a stable running stage without concurrent hotspots and risk warnings, the system does not need to start the mirror mechanism or load distribution process.
[0128] At this time, the server 104 can determine the type of the current recording task according to the parameter field carried in the recording task, such as the recording instruction type code, the time window size, the data aggregation flag, whether it is data within the summary period, whether it needs to be automatically merged, and the like. The determination result can include, but is not limited to, two types of single detail type or summary detail type. Once the task type is identified, it can be used as a control variable for subsequent recording method branching.
[0129] In step S504, in the case of a single detail type recording task type, a resource transfer recording task corresponding to the recording task information is executed for the target resource pool according to the to-be-recorded data and the resource pool identifier.
[0130] For example, when the recording task type is a single detail type, it means that the current task only needs to record a single source, independently occurring resource flow event, such as "node X releases a CPU resource" or "node Y applies for a cache". The server 104 can directly update the storage structure of the resource pool based on the to-be-recorded data carried in the task and the resource pool identifier.
[0131] For example, the to-be-recorded data indicates that node X releases 2-core CPU resources at time T, and the server 104 can find the corresponding structure according to the resource pool identifier, increase the available resource count by 2 cores, bind the timestamp T to the record, and establish a new index node in the main resource index to identify the change path. This writing is an atomic operation, which is combined with the mutex or semaphore control of the main resource pool to ensure consistency and traceability.
[0132] In step S506, in the case of a summary detail type recording task type, the summary time period is obtained, the to-be-recorded data of the target resource pool within the summary time period is added to the summary detail set, and the resource transfer recording task corresponding to the recording task information is executed for the target resource pool according to the summary detail set.
[0133] For example, when the server 104 identifies that the current task belongs to the summary detail type, it can obtain the summary time period defined in the summary parameter, such as an aggregation period of every 5 minutes or a resource change summary written once at the end of each hour. This parameter can be preset by the scheduling center or transmitted by the terminal 102 access instruction. The server 104 can locate all to-be-recorded data of the resource pool within the specified summary time period according to the time window, and temporarily store these data in the summary detail set structure. The structure can be a memory buffer queue or a lightweight key-value pair database, which is used to temporarily store all resource flow records that have occurred within this period of time. The server 104 can perform a unified aggregation operation on these records, such as merging resource releases with the same source into a single statistical data and stacking resource applications with the same target.
[0134] For example, if node X releases GPU resources multiple times within 5 minutes: 1 time releases 2 cores, 1 time releases 3 cores, the server 104 can combine the two records into node X releasing a total of 5 cores of GPU resources within the 5-minute window, and then write this aggregated summary into the structure of the target resource pool, and mark the summary time for subsequent statistics, tracing or auditing.
[0135] Through the above steps, the server 104 can adopt a more economical and efficient processing strategy in a non-hot, non-high-risk resource pool, avoiding complex mirror resource path overhead and redundant scheduling logic. At the same time, by intelligently determining the task type and shunting processing, not only the overall resource writing efficiency of the system is improved, but also the flexibility and scalability of the system structure are guaranteed, which is especially suitable for most low-frequency or periodic resource flow scenarios, and embodies the high coupling of structural separation and intelligent judgment in design.
[0136] It should be understood that although each step in the flowchart involved in each of the above embodiments is displayed in sequence according to the arrow, these steps are not necessarily executed in sequence according to the arrow. Unless otherwise stated herein, the execution of these steps is not strictly limited in sequence, and these steps can be executed in other orders. Moreover, as described above, at least part of the steps in the flowchart involved in each of the above embodiments can include multiple steps or stages, which are not necessarily executed at the same time, but can be executed at different times, and the execution sequence of these steps or stages is not necessarily sequential, but can be executed in rotation or alternation with at least part of other steps or steps or stages in other steps.
[0137] Based on the same inventive concept, the embodiments of the present application also provide a resource transfer data recording device for implementing the above-mentioned resource transfer data recording method. The problem-solving implementation scheme provided by the device is similar to the implementation scheme described in the above method, so the specific limitations in one or more resource transfer data recording device embodiments provided below can refer to the limitations of the resource transfer data recording method in the above text, which will not be repeated here.
[0138] In one exemplary embodiment, as shown in Figure 6 a resource transfer data recording device is provided, comprising: a data acquisition module 602, a feature extraction module 604, a data processing module 606 and a data recording module 608, wherein:
[0139] The data acquisition module 602 is configured to acquire record task information and to-be-recorded data corresponding to the record task information in response to the resource transfer record instruction; the to-be-recorded data is process data for indicating resource flow; and the record task information includes a resource pool identifier of a target resource pool.
[0140] The feature extraction module 604 is configured to extract at least one feature field from the record task information in a case where any one of a hotspot identifier field and a risk identifier field of the resource pool identifier is in an enabled state.
[0141] The data processing module 606 is configured to acquire mirror resource information corresponding to the target resource pool, and to select a mirror resource unit according to the feature field and the mirror resource information; each mirror resource unit of the target resource pool is configured to concurrently execute a resource transfer record task.
[0142] The data record module 608 is configured to execute the resource transfer record task corresponding to the record task information by using the mirror resource unit according to the to-be-recorded data.
[0143] In one of the embodiments, the apparatus further includes:
[0144] The frequency analysis module is configured to calculate a resource transfer frequency of the target resource pool indicated by the resource pool identifier within a preset sliding time window; and in a case where the resource transfer frequency exceeds a hotspot frequency threshold, set the hotspot identifier field to the enabled state to obtain a new resource pool identifier.
[0145] The risk identification module is configured to, in a case where the resource transfer frequency does not exceed the hotspot frequency threshold, count a resource transfer error rate of the target resource pool indicated by the resource pool identifier within the preset sliding time window; and in a case where the resource transfer error rate exceeds a risk error rate threshold, set the risk identifier field to the enabled state to obtain a new resource pool identifier.
[0146] In one of the embodiments, the mirror resource information includes mirror feature identifiers of each mirror resource unit corresponding to the target resource pool; and the data processing module 606 is specifically configured to: splice the feature field to obtain a task feature identifier; in a case where there is a mirror feature identifier matching the task feature identifier in the mirror resource information, select a mirror resource unit corresponding to the mirror feature identifier; and in a case where there is no mirror feature identifier matching the task feature identifier in the mirror resource information, generate a new mirror resource unit, take the task feature identifier as a mirror feature identifier of the new mirror resource unit, and take the new mirror resource unit as the selected mirror resource unit.
[0147] In one of the embodiments, the mirror resource information further comprises a mirror index table; the mirror index table is used to record a mapping relationship between each mirror resource unit and historical record task information; the data recording module 608 is further used to: update the mirror index table according to the selected mirror resource unit and the record task information; according to the mirror index table, perform data consistency check on each mirror resource unit corresponding to the target resource pool, and in the case that the data consistency check passes, perform the step of executing the resource transfer record task corresponding to the record task information through the mirror resource unit according to the to-be-recorded data.
[0148] In one of the embodiments, the data recording module 608 is specifically used to: in response to a consistency check instruction, acquire a to-be-checked field and a reference field value of the to-be-checked field at a checking time; according to the mirror index table, find a mirror resource unit associated with the to-be-checked field, and compare the field value of the to-be-checked field in the mirror resource unit with the reference field value to obtain a consistency check result; in the case that the consistency check results of all the to-be-checked fields associated with the target resource pool are all passed, determine that the data consistency check is passed.
[0149] In one of the embodiments, the record task information further comprises record task parameters; the apparatus further comprises a parameter analysis module, which is used to: in the case that the hotspot identification field and the risk identification field of the resource pool identification are both in the unenabled state, determine the record task type according to the record task parameters; in the case that the record task type is a single-pen detail type, execute the resource transfer record task corresponding to the record task information for the target resource pool according to the to-be-recorded data and the resource pool identification; in the case that the record task type is a summary detail type, acquire a summary time period, add the to-be-recorded data of the target resource pool in the summary time period to a summary detail set, and execute the resource transfer record task corresponding to the record task information for the target resource pool according to the summary detail set.
[0150] The above various modules in the resource transfer data recording apparatus can be all or partially realized by software, hardware and combinations thereof. The above various modules can be embedded in or independent of a processor in a computer device in a hardware form, or can be stored in a memory in a computer device in a software form, so as to be called and executed by a processor to perform operations corresponding to the above various modules.
[0151] In one exemplary embodiment, a computer device, which can be a server, is provided, and an internal structure diagram of the computer device can be as shown in FIG. 1. Figure 7As shown in the figure. The computer device includes a processor, a memory, an input / output interface (Input / Output, referred to as I / O) and a communication interface. Among them, the processor, the memory and the input / output interface are connected through the system bus, and the communication interface is connected to the system bus through the input / output interface. Among them, the processor of the computer device is used to provide computing and control capability. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store record task information and to-be-recorded data, and can also be used to store resource pool identifiers of each resource pool and related data of the historically generated mirror resource units. The input / output interface of the computer device is used to exchange information between the processor and the external device. The communication interface of the computer device is used to communicate with the external terminal through network connection. The computer program is executed by the processor to realize a resource transfer data recording method.
[0152] Those skilled in the art can understand that, Figure 7 The structure shown in the figure is only a block diagram of part of the structure related to the scheme of the present application, and does not constitute a limitation on the computer device to which the scheme of the present application is applied. The specific computer device can include more or fewer components than those shown in the figure, or combine certain components, or have a different component arrangement.
[0153] In one embodiment, a computer device is also provided, including a memory and a processor, the memory stores a computer program, and the processor executes the computer program to realize the steps in each of the above method embodiments.
[0154] In one embodiment, a computer readable storage medium is provided, which stores a computer program, and the computer program is executed by the processor to realize the steps in each of the above method embodiments.
[0155] In one embodiment, a computer program product is provided, including a computer program, and the computer program is executed by the processor to realize the steps in each of the above method embodiments.
[0156] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program. The computer program can be stored in a non-volatile computer readable storage medium, and when executed, can include the processes of the above-mentioned embodiment methods. Any reference to memory, database or other medium used in the embodiments provided in the present application can include at least one of non-volatile memory and volatile memory. The non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical storage, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetoresistive random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. The volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration but not limitation, the RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM), etc. The database involved in the embodiments provided in the present application can include at least one of a relational database and a non-relational database. The non-relational database can include a distributed database based on a block chain, etc., without being limited thereto. The processor involved in the embodiments provided in the present application can be a general-purpose processor, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, an artificial intelligence (AI) processor, etc., without being limited thereto.
[0157] The technical features of the above embodiments can be combined in any manner. To make the description concise, not all possible combinations of the technical features in the above embodiments are described, but as long as the combinations of the technical features do not exist contradictions, they should be considered as the scope of the present application.
[0158] The above-described embodiments are merely illustrative of several embodiments of the present application, which are described in more detail and in a specific manner, but should not be construed as limiting the scope of the patent of the present application. It should be noted that, for those of ordinary skill in the art, several modifications and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application should be subject to the appended claims.
Claims
1. A method for recording resource transfer data, characterized in that, The method includes: In response to a resource transfer recording instruction, record task information and the data to be recorded corresponding to the record task information are obtained; wherein, the data to be recorded is process data used to represent resource transfer; the record task information includes the resource pool identifier of the target resource pool; If either the hotspot identifier field or the risk identifier field of the resource pool identifier is enabled, at least one feature field is extracted from the recorded task information; Obtain the mirror resource information corresponding to the target resource pool, and select a mirror resource unit based on the feature field and the mirror resource information; wherein, each of the mirror resource units of the target resource pool is used to concurrently execute the resource transfer recording task; Based on the data to be recorded, the resource transfer recording task corresponding to the recording task information is executed through the mirror resource unit.
2. The method according to claim 1, characterized in that, The method further includes: Within a preset sliding time window, calculate the resource transfer frequency of the target resource pool indicated by the resource pool identifier; If the frequency of resource transfer exceeds the hotspot frequency threshold, the hotspot identifier field is set to the enabled state to obtain a new resource pool identifier; If the frequency of resource transfer does not exceed the hotspot frequency threshold, the resource transfer error rate of the target resource pool indicated by the resource pool identifier is calculated within a preset sliding time window. If the resource transfer error rate exceeds the risk error rate threshold, the risk identifier field is set to enabled to obtain a new resource pool identifier.
3. The method according to claim 1, characterized in that, The mirror resource information includes the mirror feature identifiers of each mirror resource unit corresponding to the target resource pool; the step of selecting mirror resource units based on the feature fields and the mirror resource information includes: The feature fields are concatenated to obtain the task feature identifier; If a mirror feature identifier that matches the task feature identifier exists in the mirror resource information, the mirror resource unit corresponding to the mirror feature identifier is selected; If no image feature identifier matching the task feature identifier exists in the image resource information, a new image resource unit is generated, and the task feature identifier is used as the image feature identifier of the new image resource unit, and the new image resource unit is selected as the image resource unit.
4. The method according to claim 1, characterized in that, The mirror resource information also includes a mirror index table; the mirror index table is used to record the mapping relationship between each of the mirror resource units and historical recorded task information; Before executing the resource transfer recording task corresponding to the recording task information through the mirror resource unit based on the data to be recorded, the method further includes: Update the image index table based on the selected image resource unit and the recorded task information; According to the mirror index table, data consistency verification is performed on each of the mirror resource units corresponding to the target resource pool. If the data consistency verification passes, the step of executing the resource transfer recording task corresponding to the recording task information through the mirror resource unit according to the data to be recorded is performed.
5. The method according to claim 4, characterized in that, The step of performing data consistency verification on each of the mirror resource units corresponding to the target resource pool according to the mirror index table includes: In response to a consistency check command, obtain the field to be checked and its reference field value at the check time; According to the mirror index table, find the mirror resource unit associated with the field to be verified, and compare the field value of the field to be verified in the mirror resource unit with the reference field value to obtain the consistency verification result; If the consistency check results of all the fields to be checked associated with the target resource pool are all passed, the data consistency check is deemed to have passed.
6. The method according to any one of claims 1 to 5, characterized in that, The recorded task information also includes recorded task parameters; the method further includes: If both the hotspot identifier field and the risk identifier field of the resource pool identifier are in an inactive state, the recording task type is determined according to the recording task parameters; When the recording task type is a single detail type, the resource transfer recording task corresponding to the recording task information is executed for the target resource pool based on the data to be recorded and the resource pool identifier. When the recording task type is a summary detail type, obtain the summary time period, add the data to be recorded for the target resource pool within the summary time period to the summary detail set, and execute the resource transfer recording task corresponding to the recording task information for the target resource pool according to the summary detail set.
7. A resource transfer data recording device, characterized in that, The device includes: The data acquisition module is used to respond to a resource transfer recording instruction to acquire recording task information and the data to be recorded corresponding to the recording task information; wherein, the data to be recorded is process data representing resource transfer; the recording task information includes the resource pool identifier of the target resource pool; The feature extraction module is used to extract at least one feature field from the recorded task information when either the hotspot identification field or the risk identification field of the resource pool identification is enabled. The data processing module is used to obtain the mirror resource information corresponding to the target resource pool, and select mirror resource units according to the feature fields and the mirror resource information; wherein, each of the mirror resource units of the target resource pool is used to concurrently execute resource transfer recording tasks; The data recording module is used to execute the resource transfer recording task corresponding to the recording task information through the mirror resource unit based on the data to be recorded.
8. The apparatus according to claim 7, characterized in that, The device further includes: The frequency analysis module is used to calculate the resource transfer frequency of the target resource pool indicated by the resource pool identifier within a preset sliding time window; if the resource transfer frequency exceeds the hotspot frequency threshold, the hotspot identifier field is set to the enabled state to obtain a new resource pool identifier. The risk identification module is used to calculate the resource transfer error rate of the target resource pool indicated by the resource pool identifier within a preset sliding time window when the resource transfer frequency does not exceed the hotspot frequency threshold; and to set the risk identifier field to the enabled state when the resource transfer error rate exceeds the risk error rate threshold, thereby obtaining a new resource pool identifier.
9. The apparatus according to claim 7, characterized in that, The mirror resource information includes the mirror feature identifiers of each mirror resource unit corresponding to the target resource pool; the data processing module is specifically used to: concatenate the feature fields to obtain the task feature identifier; If a mirror feature identifier that matches the task feature identifier exists in the mirror resource information, the mirror resource unit corresponding to the mirror feature identifier is selected; if no mirror feature identifier that matches the task feature identifier exists in the mirror resource information, a new mirror resource unit is generated, and the task feature identifier is used as the mirror feature identifier of the new mirror resource unit, and the new mirror resource unit is selected as the mirror resource unit.
10. The apparatus according to claim 7, characterized in that, The mirror resource information also includes a mirror index table; the mirror index table is used to record the mapping relationship between each of the mirror resource units and historical recording task information; the data recording module is further used to: update the mirror index table according to the selected mirror resource units and the recording task information; perform data consistency verification on each of the mirror resource units corresponding to the target resource pool according to the mirror index table, and if the data consistency verification passes, execute the step of executing the resource transfer recording task corresponding to the recording task information through the mirror resource units according to the data to be recorded.
11. The apparatus according to claim 10, characterized in that, The data recording module is specifically used for: responding to a consistency verification command, obtaining the field to be verified and its reference field value at the verification time; searching for the mirror resource unit associated with the field to be verified according to the mirror index table, and comparing the field value of the field to be verified in the mirror resource unit with the reference field value to obtain a consistency verification result; and determining that the data consistency verification is passed if the consistency verification results of all the fields to be verified associated with the target resource pool are all verified.
12. The apparatus according to any one of claims 7 to 11, characterized in that, The recorded task information also includes recorded task parameters; the device further includes a parameter analysis module, used for: determining the recorded task type based on the recorded task parameters when both the hotspot identifier field and the risk identifier field of the resource pool identifier are in an inactive state; executing the resource transfer recorded task corresponding to the recorded task information for the target resource pool based on the data to be recorded and the resource pool identifier when the recorded task type is a single detail type; and obtaining a summary time period when the recorded task type is a summary detail type, adding the data to be recorded for the target resource pool within the summary time period to the summary detail set, and executing the resource transfer recorded task corresponding to the recorded task information for the target resource pool based on the summary detail set.
13. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the computer program, it implements the steps of the method according to any one of claims 1 to 6.
14. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 6.
15. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 6.