Attendance checking data backtracking processing method, device and equipment, and readable storage medium

By performing fragmentation processing and backtracking calculation of attendance data, the problem of low backtracking processing of traditional attendance data is solved, and more efficient data processing is achieved.

CN119440825APending Publication Date: 2025-02-14KINGDEE SOFTWARE(CHINA) CO LTD
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202411501276.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-25
Publication Date
2025-02-14

AI Technical Summary

Technical Problem

Traditional attendance data backtracking methods are relatively inefficient, and require continuous calculations from the earliest backtracking date to the sealing date, resulting in a large number of invalid calculations.

Method used

By obtaining the initial attendance data of the attendance subject, the data is processed in pieces according to the backtracking period, the sharded attendance data is obtained, and the attendance backtracking calculation is performed based on the sharding data.

Benefits of technology

The scope of invalid calculations is reduced, the computer resource occupancy rate is reduced, and the efficiency of attendance data backtracking is improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119440825A_ABST
    Figure CN119440825A_ABST
Patent Text Reader

Abstract

The invention relates to an attendance data backtracking processing method and device, computer equipment, a computer readable storage medium and a computer program product. The method comprises the following steps: acquiring initial attendance data corresponding to an attendance subject; the initial attendance data comprises a backtracking period; performing fragmentation processing on the initial attendance data according to the backtracking period to obtain fragmented attendance data; and performing attendance backtracking calculation based on the fragmented attendance data to obtain an attendance backtracking calculation result. By adopting the method, the backtracking processing efficiency of the attendance data can be improved. The method is suitable for a human resource (HR) system and an enterprise resource planning (ERP) system which is integrated with an HR function, and the method is suitable for the human resource (HR) system and the ERP system which is integrated with the HR function.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computer technology, and in particular to a method, device, computer equipment, computer-readable storage medium and computer program product for attendance data backtracking processing. Background Art

[0002] During periodic attendance settlement or after the settlement date, the administrator or employee may adjust the attendance data during the attendance period. The adjusted attendance data will cause the attendance results during the period to change accordingly. The differences before and after the changes need to be specially counted and notified to the related systems for difference processing. This situation can be called attendance backtracking.

[0003] In traditional technology, attendance backtracking is often carried out by continuous calculation from the earliest date to be backtracked to the sealing date. This involves a lot of data content, resulting in low efficiency in attendance data backtracking processing. Summary of the invention

[0004] Based on this, it is necessary to provide an attendance data backtracking processing method, device, computer equipment, computer-readable storage medium and computer program product that can improve the efficiency of attendance data backtracking processing in response to the above technical problems.

[0005] In a first aspect, the present application provides a method for backtracking attendance data, comprising:

[0006] Obtaining initial attendance data corresponding to the attendance subject; the initial attendance data includes a retrospective period;

[0007] Slice the initial attendance data according to the retrospective period to obtain sliced ​​attendance data;

[0008] Attendance backtracking calculation is performed based on the sharded attendance data to obtain an attendance backtracking calculation result.

[0009] In one embodiment, the initial attendance data is sliced ​​according to the retrospective period to obtain the sliced ​​attendance data, including:

[0010] According to the overlap of the retrospective period, the initial attendance data is processed in slices to obtain the sliced ​​attendance data.

[0011] In one embodiment, the initial attendance data is sliced ​​according to the overlap of the retrospective period to obtain the sliced ​​attendance data, including:

[0012] Each attendance subject is regarded as a node, and the connection between each two nodes is regarded as an edge. The weight of the edge is determined according to the overlap degree of the backtracking period between the two nodes corresponding to the edge, so as to construct a graph structure;

[0013] Performing community detection on the graph structure to obtain a target community;

[0014] The shard attendance data is obtained according to the initial attendance data corresponding to the target community.

[0015] In one embodiment, the initial attendance data is sliced ​​according to the retrospective period to obtain the sliced ​​attendance data, including:

[0016] The retrospective period is processed into period units to obtain the retrospective sub-period corresponding to each attendance subject;

[0017] According to the similarities and differences between the retrospective sub-periods, the initial attendance data is processed in slices to obtain the sliced ​​attendance data.

[0018] In one embodiment, the initial attendance data is processed in slices according to the similarities and differences between the retrospective sub-periods to obtain the sliced ​​attendance data, including:

[0019] If the same retrospective sub-period exists in different attendance subjects, the initial attendance data of the different attendance subjects corresponding to the same retrospective sub-period will be taken as the same slice attendance data.

[0020] In one embodiment, the initial attendance data is processed in slices according to the similarities and differences between the retrospective sub-periods to obtain the sliced ​​attendance data, including:

[0021] If the same retrospective sub-period does not exist in different attendance subjects, the initial attendance data corresponding to each retrospective sub-period of each attendance subject will be used as the corresponding shard attendance data.

[0022] In one embodiment, the method further comprises:

[0023] Get attendance accounting results;

[0024] Compare the attendance retrospective calculation result with the attendance accounting result to obtain a comparison result;

[0025] Attendance settlement processing is performed according to the comparison result.

[0026] In a second aspect, the present application also provides an attendance data backtracking processing device, comprising:

[0027] The attendance data acquisition module is used to acquire the initial attendance data corresponding to the attendance subject; the initial attendance data includes the retrospective period;

[0028] An attendance data slicing module, used for slicing the initial attendance data according to the retrospective period to obtain slicing attendance data;

[0029] The attendance data calculation module is used to perform attendance backtracking calculation based on the sharded attendance data to obtain the attendance backtracking calculation result.

[0030] In a third aspect, the present application further provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the steps of the attendance data backtracking processing method provided in the first aspect are implemented.

[0031] In a fourth aspect, the present application further provides a computer-readable storage medium having a computer program stored thereon, and when the computer program is executed by a processor, the steps of the attendance data backtracking processing method provided in the first aspect are implemented.

[0032] In a fifth aspect, the present application further provides a computer program product, including a computer program, which, when executed by a processor, implements the steps of the attendance data backtracking processing method provided in the first aspect.

[0033] The attendance data backtracking processing method, device, computer equipment, computer-readable storage medium and computer program product obtain the initial attendance data corresponding to the attendance subject including the backtracking period, perform sharding processing on the initial attendance data according to the backtracking period to obtain sharded attendance data, perform attendance backtracking calculation based on the sharded attendance data, and obtain attendance backtracking calculation results, thereby realizing attendance backtracking discrete calculation only for the sharded attendance data, rather than continuously calculating all data between the earliest date to be backtracked to the sealing date, thereby greatly reducing the amount of data processing, reducing the resource occupancy rate of the computer, and improving the efficiency of attendance data backtracking processing. BRIEF DESCRIPTION OF THE DRAWINGS

[0034] In order to more clearly illustrate the technical solutions in the embodiments of the present application or related technologies, the drawings required for use in the embodiments of the present application or related technical descriptions will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.

[0035] FIG1 is an application environment diagram of an attendance data backtracking processing method according to an embodiment;

[0036] FIG2 is a schematic diagram of a flow chart of a method for backtracking attendance data in one embodiment;

[0037] FIG3 is a schematic diagram of initial attendance data including a retrospective period in one embodiment;

[0038] FIG4 is a schematic diagram of performing slicing processing on initial attendance data in one embodiment;

[0039] FIG5 is a schematic flow chart of a method for backtracking attendance data in another embodiment;

[0040] FIG6 is a schematic flow chart of a method for backtracking attendance data in another embodiment;

[0041] FIG7 is a structural block diagram of a device for backtracking attendance data in one embodiment;

[0042] FIG. 8 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION

[0043] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying 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.

[0044] The basic process of attendance data backtracking is to select the attendance subject and date range that need to be backtracked, obtain the corresponding data from the database, calculate according to the granularity of each attendance subject, compare the result of the backtracking calculation with the result of the initial calculation, and obtain the corresponding difference. The traditional solution is to perform continuous calculations from the earliest date to be backtracked to the sealing date, but the data calculated in this way will include attendance data corresponding to dates that did not generate backtracking events, that is, there are a lot of invalid calculations, resulting in low efficiency of attendance backtracking processing.

[0045] Based on the technical problem of low efficiency of the above-mentioned attendance backtracking processing, an embodiment of the present application provides a method for backtracking attendance data, which reduces the scope of invalid calculations and improves the efficiency of backtracking processing by only calculating the backtracking period corresponding to the backtracking event.

[0046] The attendance data backtracking processing method provided in the embodiment of the present application can be applied in the application environment shown in Figure 1. Among them, the terminal 102 communicates with the server 104 through the network. The data storage system can store the data that the server 104 needs to process. The data storage system can be integrated on the server 104, or it can be placed on the cloud or other network servers. The server 104 can obtain the initial attendance data corresponding to the attendance subject sent by the terminal 102, and the initial attendance data includes the backtracking period; the server 104 performs slicing processing on the initial attendance data according to the backtracking period to obtain the slicing attendance data, and performs attendance backtracking calculation based on the slicing attendance data to obtain the attendance backtracking calculation result. Among them, the terminal 102 can be, but is not limited to, various personal computers, laptops, smart phones, tablet computers, Internet of Things devices and portable wearable devices. The Internet of Things devices can be smart speakers, smart TVs, smart air conditioners, smart car-mounted devices, projection devices, etc. Portable wearable devices can be smart watches, smart bracelets, head-mounted devices, 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 an independent physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides cloud computing services. It should be noted that the attendance data backtracking processing method provided in the embodiment of the present application is not limited to the interaction scenario between the above-mentioned server and the terminal, but can also be applied to the terminal alone or to the application scenario of the server alone.

[0047] In an exemplary embodiment, as shown in FIG2 , a method for backtracking attendance data is provided, which is described by taking the method applied to the server in FIG1 as an example, and includes the following steps 202 to 206. Among them:

[0048] Step 202, obtaining the initial attendance data corresponding to the attendance subject, wherein the initial attendance data includes a retrospective period.

[0049] Among them, the attendance subject refers to the subject that conducts the attendance event, such as the employees who participate in the attendance. The initial attendance data refers to the original attendance data corresponding to the attendance subject. The initial attendance data may include, for example, the attendance subject and the retrospective period corresponding to the attendance subject. The initial attendance data may also include attendance events, attendance periods, etc. Among them, attendance events refer to events in the attendance process, such as normal clocking in, vacation, business trip, overtime or make-up sign-in, etc. The attendance period refers to the time unit for attendance statistics, such as a natural month, ten days or half a month. The retrospective period refers to the attendance period corresponding to the date of the retrospective event. For example, the date of the retrospective event is January 15, 2024 to February 2, 2024. If the attendance period is calculated as a natural month, the attendance period corresponding to the date of the retrospective event is January and February, then the corresponding retrospective period is January 2024 and February 2024. It is easy to understand that it is usually impossible for a retrospective event to occur in every attendance period, so the retrospective period exists discretely, that is, it appears discretely in different attendance periods.

[0050] Optionally, the server can obtain the initial attendance data corresponding to the attendance subject sent by the terminal, or can obtain the initial attendance data through the human-computer interaction interface. There are usually multiple attendance subjects, and the initial attendance data corresponding to each attendance subject is different.

[0051] Exemplarily, as shown in Figure 3, the initial attendance data can be recorded in a report or a database, and the corresponding tracing events that need to be traced back to each attendance subject are marked in the corresponding table, as well as the date when the tracing event occurred, the sealed event without tracing back and the corresponding date, the current event without tracing back and the corresponding date. Wherein, the date when the tracing event occurred can be characterized by the corresponding period, the sealed event without tracing back refers to the event corresponding to the attendance data that has been sealed and will not be changed, and the current event without tracing back refers to the event that does not need to be traced back in the current situation, such as the attendance data of the month. It can be understood that the event type stored in the table can be selected as needed, and the sealed event without tracing back and the specific event type corresponding to the current event without tracing back can also be selected according to the actual application scenario. In the process of carrying out the attendance data tracing back, it is mainly to perform tracing back calculation for the tracing back event that needs to be traced back, that is, to calculate the tracing back period and attendance subject corresponding to the tracing back event.

[0052] Step 204, slicing the initial attendance data according to the retrospective period to obtain slicing attendance data.

[0053] Among them, sharding can be understood as the process of splitting a large data set into multiple smaller data fragments. Sharded attendance data refers to the fragmented initial attendance data obtained by sharding the initial attendance data. Sharding the initial attendance data according to the retrospective period can obtain sharded attendance data corresponding to multiple shards.

[0054] Exemplarily, as shown in FIG4 , the initial attendance data can be processed into slices according to the overlap of the retrospective periods corresponding to the attendance subjects, and the sliced ​​attendance data corresponding to the multiple slices can be obtained. For example, the initial attendance data of the attendance subject whose overlap of the retrospective period is greater than or equal to the first threshold is taken as the first slice, i.e., slice 1, to obtain the sliced ​​attendance data corresponding to the first slice, the initial attendance data of the attendance subject whose overlap of the retrospective period is greater than the second threshold and less than the first threshold is taken as the second slice, i.e., slice 2, to obtain the sliced ​​attendance data corresponding to the second slice, and the initial attendance data of the attendance subject whose overlap of the retrospective period is less than or equal to the second threshold is taken as the third slice, i.e., slice 3, etc. Among them, the first threshold is greater than the second threshold, and the second threshold is greater than the third threshold. The grouping in the slice 1 illustrated in FIG4 is used to characterize the dates of overlapping retrospective periods, i.e., there are overlapping retrospective periods at each grouping corresponding to the attendance subject 1 and the attendance subject 2.

[0055] Optionally, the overlap between the retrospective periods corresponding to any two attendance subjects in each attendance subject can be calculated, a similarity matrix can be constructed according to the overlap, and then the similarity matrix can be clustered to obtain corresponding classes, each class corresponding to a shard, thereby obtaining corresponding shard attendance data.

[0056] It can be understood that the initial attendance data corresponding to each shard actually divides the attendance subjects with a high degree of overlap in the retrospective period into the same shard, so that the date ranges that need to be calculated for the attendance subjects in the same shard are mostly overlapping, and the date calculation range of the same shard is equivalent to the union of the calculation ranges corresponding to all the attendance subjects in the shard. In this way, most of the calculation ranges are actually required to be calculated, and the range of invalid calculations will be greatly reduced, thereby improving the calculation efficiency.

[0057] Step 206, performing attendance backtracking calculation based on the sharded attendance data to obtain the attendance backtracking calculation result.

[0058] The shard attendance data usually includes the initial attendance data corresponding to multiple shards. The shard attendance data of each shard is back-calculated to obtain the back-calculation result of each shard. The back-calculation result of the attendance is obtained based on the back-calculation results of each shard. For example, the back-calculation results of each shard are summarized to obtain the final back-calculation result of the attendance. The back-calculation result of the attendance is used to characterize the attendance result obtained by the back-calculation.

[0059] In the above-mentioned attendance data backtracking processing method, the initial attendance data is sliced ​​according to the backtracking period to obtain the sliced ​​attendance data, and then the attendance backtracking calculation is performed based on the sliced ​​attendance data to obtain the attendance backtracking calculation result. It can be achieved by only performing attendance backtracking discrete calculation on the sliced ​​attendance data, without the need to continuously calculate all data between the earliest date to be backtracked to the sealing date, thereby greatly reducing the data processing volume, reducing the resource occupancy rate of the computer, and improving the efficiency of attendance data backtracking processing.

[0060] In an exemplary embodiment, the step 204 of slicing the initial attendance data according to the retrospective period to obtain the slicing attendance data includes:

[0061] According to the overlap of the retrospective period, the initial attendance data is segmented to obtain segmented attendance data.

[0062] The retrospective periods corresponding to different attendance subjects may be the same or different. According to the overlap of the retrospective periods, the initial attendance data is sharded to obtain multiple sharded attendance data.

[0063] In one example, the range of the retrospective period corresponding to each attendance subject can be represented by a pair consisting of a start period and an end period, that is, (start period, end period). Then, the overlap of the retrospective periods corresponding to any two attendance subjects is calculated. The overlap of the retrospective periods can be characterized according to the time overlap length. For example, the overlap of the retrospective periods can be determined according to the overlap time length and the total length of the retrospective period range corresponding to the two attendance subjects. For example, the overlap of the retrospective periods corresponding to the two attendance subjects is obtained by taking the quotient of the overlap time length and the sum of the total length of the retrospective period range corresponding to the two attendance subjects. Assuming that the overlap time length of the retrospective periods corresponding to attendance subject A and attendance subject B is H0, the total length of the retrospective period corresponding to attendance subject A is H1, and the total length of the retrospective period corresponding to attendance subject B is H2, then the overlap L of the retrospective periods corresponding to attendance subject A and attendance subject B is: L= K*H0 / (H1+H2), where K is a constant, such as K is 2, 3 or 4, etc.

[0064] After obtaining the overlap between the retrospective periods corresponding to any two attendance subjects, a similarity matrix is ​​constructed based on the overlap. For example, a matrix of size N*N is created, where N represents the number of attendance subjects, and each element in the matrix is ​​represented as (i, j). (i, j) is used to characterize the overlap between the retrospective periods of the i-th attendance subject and the j-th attendance subject. Exemplarily, the retrospective periods corresponding to attendance subject A are (2024-05-01, 2024-05-15), (2024-06-10, 2024-06-20), the retrospective periods corresponding to attendance subject B are (2024-05-03, 2024-05-18), and the retrospective periods corresponding to attendance subject C are (2024-05-05, 2024-05-21), (2024-06-08, 2024-06-23). ​​The overlap of the retrospective periods between each attendance subject and other attendance subjects is calculated. For example, the overlap degree of attendance subject A is (1, 0.62, 0.75), the overlap degree of attendance subject B is (0.62, 1, 0.57), and the overlap degree of attendance subject C is (0.75, 0.57, 1). Taking attendance subject A as an example, 1 represents the overlap degree of attendance subject A and attendance subject A during the retrospective period, 0.62 represents the overlap degree of attendance subject A and attendance subject B during the retrospective period, and 0.75 represents the overlap degree of attendance subject A and attendance subject C during the retrospective period. The overlap degree of the retrospective period corresponding to other attendance subjects is similar, and will not be repeated here. Accordingly, according to the overlap degree of the retrospective period obtained in the above example, a 3*3 similarity matrix can be obtained. , convert the similarity matrix into a distance matrix. The distance can be understood as the degree of dissimilarity. Therefore, the corresponding distance can be obtained according to the difference between 1 and the similarity, thereby obtaining the corresponding distance matrix .

[0065] The distance matrix can be clustered according to the clustering algorithm to obtain K classes, and the attendance subjects included in each class have similar overlap in the retrospective period. Wherein, K is a positive integer. Each class corresponds to a shard, and the initial attendance data of the attendance subject in each class is the attendance data of the corresponding shard. It can be understood that N in the above example is not limited to 3. In actual application scenarios, the number of attendance subjects involved in retrospective processing is at least on the order of one hundred thousand.

[0066] Optionally, the initial attendance data may be sharded multiple times according to the retrospective period to obtain corresponding sharded attendance data, and the sharding method of each sharding process may be the same or different. Exemplarily, the attendance subjects in the same attendance period during the retrospective period may be divided into the same shard, that is, pre-sharding may be performed first, for example, the attendance subjects in the same month during the retrospective period may be divided into the same shard, and then, based on the overlap of the retrospective period, sharding may be performed again on the basis of the aforementioned sharding to obtain sharded attendance data.

[0067] In this embodiment, the initial attendance data is fragmented according to the overlap of the retrospective period to obtain fragmented attendance data, that is, by calculating the overlap of the retrospective period corresponding to each attendance subject and performing fragmentation processing according to the overlap of the retrospective period, the fragmentation efficiency can be improved, thereby further improving the efficiency of the retrospective processing of the attendance data.

[0068] In some embodiments, the initial attendance data is processed into slices according to the overlap of the retrospective period to obtain sliced ​​attendance data, including:

[0069] Each attendance subject is regarded as a node, and the connection between every two nodes is regarded as an edge. The weight of the edge is determined according to the overlap between the two nodes corresponding to the edge during the backtracking period, and a graph structure is constructed. Community detection is performed on the graph structure to obtain the target community. According to the initial attendance data corresponding to the target community, the sharded attendance data is obtained.

[0070] Exemplarily, each attendance subject is taken as a node, and a connection line is set between every two attendance nodes. Each connection line includes a corresponding weight. The weight of the connection line is determined by the overlap between the two nodes corresponding to the connection line during the retrospective period, wherein the higher the overlap during the retrospective period, the greater the weight of the corresponding connection line, and the lower the overlap during the retrospective period, the smaller the weight of the corresponding connection line. The connection line is also called an edge, and the structure composed of the corresponding nodes and edges is a graph structure, that is, the graph structure includes the attendance subject and the overlap between the attendance subjects during the retrospective period. The established graph structure can be subjected to community detection according to the community detection algorithm to obtain the target community. Among them, the community detection algorithm is a method for analyzing the community structure in a network or graph structure. The community structure refers to a group of nodes with close connections in the network, and the connection between the nodes in the same community is closer than the connection between the nodes and other communities. For example, the community detection algorithm is the Girvan-Newman algorithm, the Louvain algorithm, the Label Propagation algorithm (LPA), the Infomap algorithm, etc. The target community may include multiple, and the initial attendance data corresponding to the nodes in each target community is the shard attendance data corresponding to a shard.

[0071] Optionally, the shard attendance data of the corresponding shard can be obtained according to the initial attendance data corresponding to each target community. It can be understood that the corresponding target community can be obtained according to the density corresponding to the community, and the higher the density, the higher the overlap of the backtracking period corresponding to the corresponding node, and the lower the density, the lower the overlap of the backtracking period corresponding to the corresponding node.

[0072] In this embodiment, by establishing a corresponding graph structure according to the attendance nodes and the overlap during the backtracking period, and performing community detection on the graph structure, sharding processing is realized, and corresponding sharding attendance data is obtained. This enables sharding processing to be realized more intuitively and simply, reduces the complexity of sharding processing, and thus improves sharding processing efficiency.

[0073] In an exemplary embodiment, the step 204 of slicing the initial attendance data according to the retrospective period to obtain the slicing attendance data includes:

[0074] The retrospective period is processed into period units to obtain the retrospective sub-period corresponding to each attendance subject; according to the similarities and differences between the retrospective sub-periods, the initial attendance data is segmented to obtain the segmented attendance data.

[0075] The period unitization process refers to the division process according to the minimum period unit. For example, the minimum period unit is an attendance period. Assuming that an attendance period is one month, the retrospective period is divided into the minimum unit of one month to obtain the corresponding retrospective sub-period. It can be understood that the minimum period unit corresponding to the period unitization process can be set according to the actual application scenario, such as one month, ten days or half a month.

[0076] Optionally, the initial attendance data corresponding to the same retrospective sub-period in different attendance subjects may be divided into shard attendance data corresponding to the same shard. For example, based on the minimum unit of one month, the retrospective sub-periods corresponding to attendance subject A are 2024-01, 2024-02 and 2024-05, the retrospective sub-periods corresponding to attendance subject B are 2024-02, 2024-04 and 2024-05, and the retrospective sub-periods corresponding to attendance subject C are 2024-01 and 2024-04; the initial attendance data corresponding to the same retrospective sub-period are divided into the same shard, so it can be, shard 1: attendance subject A (2024-02, 2024-05), attendance subject B (2024-02, 2024-05); shard 2: attendance subject A (2024-01), attendance subject C (2024-01); shard 3: attendance subject B (2024-04), attendance subject C (2024-04). Alternatively, it can also be, shard 1: attendance subject A (2024-02, 2024-05), attendance subject B (2024-02, 2024-05); shard 2: attendance subject A (2024-01), attendance subject B (2024-04), attendance subject C (2024-01, 2024-04). It is easy to understand that after sharding, the shard attendance data corresponding to each shard can be obtained. If there is no identical retrospective sub-period in different attendance subjects, that is, the retrospective sub-periods corresponding to each attendance subject are different, then all the initial attendance data corresponding to each retrospective sub-period corresponding to each attendance subject can be used as a shard attendance data.

[0077] In the aforementioned embodiment, the sharding is performed based on the granularity of the attendance subject, that is, one attendance subject can only be assigned to one shard, while in the present embodiment, the retrospective period is unitized to obtain the retrospective sub-period corresponding to each attendance subject, and the initial attendance data is sharded according to the similarities and differences of the retrospective sub-periods to obtain the sharded attendance data, that is, the sharding is performed based on the granularity of the attendance subject and the retrospective sub-period, and the same attendance subject may be assigned to different shards, thereby achieving finer-grained sharding, so that the overlap of the corresponding retrospective periods in each shard is higher, and the higher the overlap of the retrospective periods, the smaller the corresponding period range involved, thereby reducing the period range of the retrospective calculation, further reducing the data processing volume, and improving the efficiency of the retrospective calculation of the attendance data.

[0078] In some embodiments, the initial attendance data is processed in slices according to the similarities and differences between the retrospective sub-periods to obtain sliced ​​attendance data, including:

[0079] If the same retrospective sub-period exists in different attendance subjects, the initial attendance data of different attendance subjects corresponding to the same retrospective sub-period will be regarded as the same shard attendance data.

[0080] Optionally, the retrospective sub-periods corresponding to the various attendance subjects are compared, and if there are identical retrospective sub-periods, the initial attendance data of different attendance subjects corresponding to the identical retrospective sub-periods are used as the shard attendance data of the same shard.

[0081] It is easy to understand that the slice attendance data of the same slice does not necessarily include the initial attendance data corresponding to all attendance subjects, and may include the initial attendance data corresponding to all or part of the attendance subjects, or may include the initial attendance data corresponding to one attendance subject.

[0082] Optionally, if there is no identical retrospective sub-period in each attendance subject, the initial attendance data of the retrospective sub-period corresponding to each attendance subject can be used as a corresponding shard attendance data, that is, one retrospective sub-period corresponds to one shard. Alternatively, the initial attendance data of the retrospective sub-period corresponding to each attendance subject can be used as a shard attendance data, that is, multiple retrospective sub-periods correspond to one shard.

[0083] In this embodiment, by using the initial attendance data of different attendance subjects corresponding to the same retrospective sub-period as the attendance data of the same shard, it is possible to achieve a higher degree of overlap of the retrospective period in each shard through finer-grained shards to a greater extent, thereby further reducing the amount of attendance data to be processed and improving the efficiency of attendance data retrospective processing.

[0084] In some embodiments, the initial attendance data is processed in slices according to the similarities and differences between the retrospective sub-periods to obtain sliced ​​attendance data, including:

[0085] If the same retrospective sub-period does not exist in different attendance subjects, the initial attendance data corresponding to each retrospective sub-period of each attendance subject will be used as the corresponding shard attendance data.

[0086] Among them, there is no same retrospective sub-period in different attendance subjects, that is, the retrospective sub-periods corresponding to different attendance subjects are different, so the initial attendance data corresponding to each retrospective sub-period of each attendance subject can be used as a sharded attendance data.

[0087] Optionally, after obtaining the retrospective sub-periods corresponding to each attendance subject, the retrospective sub-periods corresponding to each attendance subject are compared. If there are the same retrospective sub-periods, the initial attendance data of different attendance subjects corresponding to the same retrospective sub-periods are divided into the same shard to obtain the corresponding shard attendance data; if the initial attendance data of the same retrospective sub-period does not exist in the remaining initial attendance data, the initial attendance data corresponding to each retrospective period is taken as the shard attendance data of one shard.

[0088] In this embodiment, if there is no identical retrospective sub-period in different attendance subjects, the initial attendance data corresponding to each retrospective sub-period of each attendance subject is used as the corresponding shard attendance data, thereby reducing the number of shards and improving sharding efficiency.

[0089] In some embodiments, the above method further comprises:

[0090] Obtain attendance accounting results; compare attendance retrospective calculation results with attendance accounting results to obtain comparison results; perform attendance settlement processing based on the comparison results.

[0091] Among them, the attendance accounting result refers to the result of attendance accounting, which is usually the result of all attendance data. In actual application scenarios, the attendance accounting result is the result of periodic attendance accounting performed by the employer, and the attendance retrospective calculation result is often the result of retrospective calculation after attendance accounting when the attendance data has changed or there is a corresponding calculation demand.

[0092] Optionally, the attendance retrospective calculation result is compared with the attendance accounting result to obtain a comparison result, which may include whether there is a difference or not. If the comparison result is that there is a difference, then attendance settlement processing is performed based on the difference, for example, re-issuance and re-deduction processing of salary, etc. If the comparison result is that there is no difference, it means that the attendance retrospective calculation result is consistent with the attendance accounting result, and there is no need to perform settlement processing related to attendance.

[0093] In this embodiment, by comparing the attendance retrospective calculation result with the attendance accounting result, a comparison result is obtained, and attendance settlement is processed according to the comparison result. This can avoid retrospective calculation of all attendance data, and attendance settlement can be achieved based on whether there is a difference in the comparison result, which can improve the efficiency of attendance settlement.

[0094] In an exemplary embodiment, as shown in FIG. 5 , the attendance data backtracking processing method includes the following steps 502 to 510 .

[0095] Step 502, obtaining initial attendance data corresponding to the attendance subject, wherein the initial attendance data includes a retrospective period.

[0096] Step 504: Calculate the overlap between the traceback periods corresponding to any two attendance entities, and construct a similarity matrix based on the overlap.

[0097] Step 506: determine a distance matrix according to the similarity matrix.

[0098] Step 508, clustering the distance matrix according to a clustering algorithm to obtain multiple classes, each class corresponding to the attendance data of a segment.

[0099] Step 510, performing attendance backtracking calculation based on the sharded attendance data to obtain the attendance backtracking calculation result.

[0100] In this implementation, by clustering and sharding the initial attendance data according to the granularity of the attendance subject, fast sharding can be achieved and the sharding efficiency can be improved. At the same time, the attendance backtracking processing is performed through sharding. The date ranges that need to be calculated mostly overlap. The calculation range of the same shard only needs to take the union of the calculation ranges corresponding to the attendance subject in the shard. In this way, most of the calculation ranges need to be backtracked, and the range of invalid calculations will be greatly reduced, which can reduce the amount of data processing, reduce the resources occupied by the backtracking processing, avoid the risk of system memory overflow, and improve the efficiency of the backtracking processing of attendance data.

[0101] In another exemplary embodiment, as shown in FIG. 6 , the attendance data backtracking processing method includes the following steps 602 to 614 .

[0102] Step 602, obtaining initial attendance data corresponding to the attendance subject, wherein the initial attendance data includes a retrospective period.

[0103] Step 604: Unitize the retrospective period to obtain the retrospective sub-period corresponding to each attendance subject.

[0104] Step 606: If the same retrospective sub-period exists in different attendance subjects, the initial attendance data of different attendance subjects corresponding to the same retrospective sub-period is used as the same slice attendance data.

[0105] Step 608: If there is no same retrospective sub-period in different attendance subjects, the initial attendance data corresponding to each retrospective sub-period of each attendance subject is used as a shard attendance data.

[0106] Step 610, performing attendance backtracking calculation based on the sharded attendance data to obtain the attendance backtracking calculation result.

[0107] Step 612, obtaining the attendance accounting result, and comparing the attendance retrospective calculation result with the attendance accounting result to obtain a comparison result.

[0108] Step 614, perform attendance settlement processing based on the comparison result.

[0109] In this embodiment, by sharding according to the attendance subject and the retrospective period, finer-grained sharding can be achieved, and the overlap of the retrospective period of the attendance subject in each shard is higher, thereby further reducing the range of the calculation date in the corresponding shard, further reducing the data processing volume, and improving the efficiency of the retrospective processing of attendance data.

[0110] It should be understood that, although the various steps in the flowcharts involved in the above-mentioned embodiments are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps does not have a strict order restriction, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above-mentioned embodiments can include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the steps or stages in other steps.

[0111] Based on the same inventive concept, the embodiment of the present application also provides an attendance data backtracking processing device for implementing the attendance data backtracking processing method involved above. The implementation scheme for solving the problem provided by the device is similar to the implementation scheme recorded in the above method, so the specific limitations in the one or more attendance data backtracking processing device embodiments provided below can refer to the limitations of the attendance data backtracking processing method above, and will not be repeated here.

[0112] In an exemplary embodiment, as shown in FIG. 7 , a device for processing attendance data backtracking is provided, including: an attendance data acquisition module 702, an attendance data segmentation module 704, and an attendance data accounting module 706, wherein:

[0113] The attendance data acquisition module 702 is used to acquire the initial attendance data corresponding to the attendance subject; the initial attendance data includes the retrospective period;

[0114] The attendance data slicing module 704 is used to slice the initial attendance data according to the retrospective period to obtain sliced ​​attendance data;

[0115] The attendance data calculation module 706 is used to perform attendance retrospective calculation based on the sliced ​​attendance data to obtain the attendance retrospective calculation result.

[0116] In some embodiments, the attendance data slicing module 704 is further used to slice the initial attendance data according to the overlap of the retrospective period to obtain the sliced ​​attendance data.

[0117] In some embodiments, the attendance data sharding module 704 is also used to take each attendance subject as a node, the line between each two nodes as an edge, and determine the weight of the edge according to the overlap between the two nodes corresponding to the edge during the backtracking period, to construct a graph structure; perform community detection on the graph structure to obtain a target community; and obtain the sharded attendance data according to the initial attendance data corresponding to the target community.

[0118] In some embodiments, the attendance data slicing module 704 is also used to process the retrospective period into period units to obtain the retrospective sub-period corresponding to each attendance subject; and to slice the initial attendance data according to the similarities and differences between the retrospective sub-periods to obtain the sliced ​​attendance data.

[0119] In some embodiments, the attendance data slicing module 704 is further used to use the initial attendance data of different attendance subjects corresponding to the same slicing sub-period as the same slicing attendance data if the same slicing sub-period exists in different attendance subjects.

[0120] In some embodiments, the attendance data slicing module 704 is further used to use the initial attendance data corresponding to each tracing sub-period of each attendance subject as the corresponding slicing attendance data if there is no same tracing sub-period in different attendance subjects.

[0121] In some embodiments, the attendance data backtracking processing device further includes a result comparison module for obtaining attendance accounting results; comparing the attendance backtracking calculation results with the attendance accounting results to obtain a comparison result; and performing attendance settlement processing according to the comparison result.

[0122] Each module in the above-mentioned attendance data backtracking processing device can be implemented in whole or in part by software, hardware and a combination thereof. Each of the above-mentioned modules can be embedded in or independent of a processor in a computer device in the form of hardware, or can be stored in a memory in a computer device in the form of software, so that the processor can call and execute the operations corresponding to each of the above modules.

[0123] In an exemplary embodiment, a computer device is provided, which may be a server, and its internal structure diagram may be shown in FIG8. The computer device includes a processor, a memory, an input / output interface (Input / Output, referred to as I / O) and a communication interface. The processor, the memory and the input / output interface are connected through a system bus, and the communication interface is connected to the system bus through the input / output interface. The processor of the computer device is used to provide computing and control capabilities. 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 initial attendance data. The input / output interface of the computer device is used to exchange information between the processor and an external device. The communication interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, a method for backtracking attendance data is implemented.

[0124] Those skilled in the art will understand that the structure shown in FIG. 8 is merely a block diagram of a partial structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than shown in the figure, or combine certain components, or have a different arrangement of components.

[0125] In an exemplary embodiment, a computer device is provided, including a memory and a processor, wherein a computer program is stored in the memory, and the processor implements the steps of the attendance data backtracking processing method when executing the computer program.

[0126] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the steps of the attendance data backtracking processing method described above are implemented.

[0127] In one embodiment, a computer program product is provided, including a computer program, which implements the steps of the attendance data backtracking processing method when executed by a processor.

[0128] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with relevant regulations.

[0129] A person of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiment method can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the 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. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited to this. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, 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., but are not limited to this.

[0130] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this application.

[0131] The above-described embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present application. It should be pointed out that, for a person of ordinary skill in the art, several variations 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 shall be subject to the attached claims.

Claims

1. A method for backtracking attendance data, characterized in that: The method comprises: Obtaining initial attendance data corresponding to the attendance subject; the initial attendance data includes a retrospective period; Slice the initial attendance data according to the retrospective period to obtain sliced ​​attendance data; Attendance backtracking calculation is performed based on the sharded attendance data to obtain an attendance backtracking calculation result.

2. The method according to claim 1, characterized in that The initial attendance data is processed in slices according to the retrospective period to obtain sliced ​​attendance data, including: According to the overlap of the retrospective period, the initial attendance data is processed in slices to obtain the sliced ​​attendance data.

3. The method according to claim 2, characterized in that The initial attendance data is processed into slices according to the overlap of the retrospective period to obtain the sliced ​​attendance data, including: Each attendance subject is regarded as a node, the connection between each two nodes is regarded as an edge, and the weight of the edge is determined according to the overlap degree of the backtracking period between the two nodes corresponding to the edge, so as to construct a graph structure; Performing community detection on the graph structure to obtain a target community; The shard attendance data is obtained according to the initial attendance data corresponding to the target community.

4. The method according to claim 1, characterized in that The initial attendance data is processed in slices according to the retrospective period to obtain sliced ​​attendance data, including: The retrospective period is processed into period units to obtain the retrospective sub-period corresponding to each attendance subject; According to the similarities and differences between the retrospective sub-periods, the initial attendance data is processed in slices to obtain the sliced ​​attendance data.

5. The method according to claim 4, characterized in that The initial attendance data is processed in slices according to the similarities and differences between the retrospective sub-periods to obtain the sliced ​​attendance data, including: If the same retrospective sub-period exists in different attendance subjects, the initial attendance data of the different attendance subjects corresponding to the same retrospective sub-period will be taken as the same slice attendance data.

6. The method according to claim 4, characterized in that The initial attendance data is processed in slices according to the similarities and differences between the retrospective sub-periods to obtain the sliced ​​attendance data, including: If the same retrospective sub-period does not exist in different attendance subjects, the initial attendance data corresponding to each retrospective sub-period of each attendance subject will be used as the corresponding shard attendance data.

7. The method according to any one of claims 1 to 6, characterized in that: The method further comprises: Get attendance accounting results; Compare the attendance retrospective calculation result with the attendance accounting result to obtain a comparison result; Attendance settlement processing is performed according to the comparison result.

8. A device for processing attendance data retrospectively, characterized in that: The device comprises: The attendance data acquisition module is used to acquire the initial attendance data corresponding to the attendance subject; the initial attendance data includes the retrospective period; An attendance data slicing module, used for slicing the initial attendance data according to the retrospective period to obtain slicing attendance data; The attendance data calculation module is used to perform attendance backtracking calculation based on the sharded attendance data to obtain the attendance backtracking calculation result.

9. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 7 are implemented.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.

11. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.

Citation Information

Cited By

  • Intelligent assessment data processing method

    CN120689019A