A work hour data processing method and device, computer equipment and storage medium

By identifying and converting the identifiers of time data and processing the time data according to the granularity of the cycle, the problem of cumbersome project model switching caused by the difference in time data format under different work modes is solved, and flexible switching and improved applicability are achieved.

CN115905224BActive Publication Date: 2026-01-27SHENZHEN FULIN TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202211414323.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-11-11
Publication Date
2026-01-27
Estimated Expiration
2042-11-11

AI Technical Summary

Technical Problem

The differences in time data formats under different working modes in existing technologies make project model switching cumbersome and unable to achieve flexible switching.

Method used

By acquiring data query requests and the current working mode, the system identifies the identifiers of the working hour data. When the identifiers differ, the system performs data transformation processing based on the period granularity to generate target data to adapt to the new working mode.

Benefits of technology

It ensures that the format of the time data corresponds to the current work mode, avoids data migration, enables flexible switching between project models, and improves applicability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115905224B_ABST
    Figure CN115905224B_ABST
Patent Text Reader

Abstract

The embodiment of the application belongs to the field of artificial intelligence, and relates to a work hour data processing method, comprising obtaining a data query request and a current work mode; wherein the data query request is used for querying work hour data; all work hour data corresponding to the data query request is called from a database; a first identifier corresponding to the current work mode and a second identifier corresponding to the work hour data are respectively obtained; if the first identifier and the second identifier are the same, the work hour data is taken as target data; if the first identifier and the second identifier are different, a cycle granularity corresponding to the current work mode is obtained, the work hour data is processed by data conversion according to the cycle granularity, and target data is generated; and the target data is processed into report data. The application also provides a work hour data processing device, a computer device and a storage medium. The application realizes flexible switching between project models and has wide applicability.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of artificial intelligence technology, and in particular to methods, apparatus, computer equipment and storage media for processing working time data. Background Technology

[0002] In current project management, different work modes correspond to different work granularities, so different project models need to be set up for adaptation. However, due to the difference in the format of the time data stored under each work mode, if it is necessary to switch modes, a new project model needs to be set up and the time data from the original project model needs to be migrated to the new project model. The steps are complicated and cannot achieve flexible switching between project models. Summary of the Invention

[0003] The purpose of this application is to provide a method, apparatus, computer equipment, and storage medium for processing work time data, so as to solve the problem that the prior art cannot achieve flexible switching between project models.

[0004] To address the aforementioned technical problems, this application provides a method for processing time data, employing the following technical solution:

[0005] A method for processing time data includes the following steps:

[0006] Obtain the data query request and the current working mode; wherein, the data query request is used to query working hour data;

[0007] Retrieve all working hour data corresponding to the data query request from the database;

[0008] Obtain the first identifier corresponding to the current working mode and the second identifier corresponding to the working time data, respectively;

[0009] If the first identifier and the second identifier are the same, the working time data will be used as the target data;

[0010] If the first identifier and the second identifier are different, then the cycle granularity corresponding to the current working mode is obtained, and the working time data is processed according to the cycle granularity to generate target data;

[0011] The target data is processed into report data.

[0012] Furthermore, the step of performing data transformation processing on the time data according to the said periodic granularity to generate target data includes:

[0013] All the time data retrieved are classified according to the work item category to obtain the work item category corresponding to each time data;

[0014] The time data in the work item category is transformed according to the stated periodic granularity to generate target data.

[0015] Furthermore, the current working mode is a summary mode, and the data transformation process is a splitting process; the step of performing data transformation processing on the time data in the work item category according to the periodic granularity to generate target data includes:

[0016] The time data in the work item category are split according to the cycle granularity to obtain multiple target data, one of which corresponds to one cycle granularity.

[0017] Furthermore, the current working mode is a simple mode, and the data conversion process is a merging process; the step of performing data conversion processing on the time data in the work item category according to the periodic granularity to generate target data includes:

[0018] All time data in the work item category are merged according to the said period granularity to obtain target data corresponding to the said period granularity.

[0019] Furthermore, the step of processing the target data into report data includes:

[0020] Determine whether the target data is duration data, and obtain the determination result;

[0021] Based on the judgment result, the target data is formatted to obtain the report data.

[0022] Furthermore, the step of determining whether the target data is duration data and obtaining the determination result includes:

[0023] Extract the start and end times from the target data;

[0024] If the attribute value of the start time meets the first threshold and the attribute value of the end time does not meet the second threshold, then the result of the judgment that the target data is not duration data is obtained.

[0025] If the attribute value of the start time meets the first threshold and the attribute value of the end time does not meet the second threshold, then the result of determining that the target data is duration data is obtained.

[0026] Furthermore, the step of converting the target data according to the judgment result to obtain the report data includes:

[0027] If the judgment result indicates that the target data is duration data, the target data is split to obtain multiple sub-target data, and the format of each merged sub-target data is converted to form report data.

[0028] If the judgment result indicates that the target data is not duration data, the target data format will be converted to form report data.

[0029] To address the aforementioned technical problems, this application also provides a time data processing device, which employs the following technical solution:

[0030] The first acquisition module is used to acquire data query requests and the current working mode; wherein, the data query request is used to query working hour data;

[0031] The calling module is used to retrieve all working hour data corresponding to the data query request from the database;

[0032] The second acquisition module is used to acquire the first identifier corresponding to the current working mode and the second identifier corresponding to the working time data, respectively.

[0033] The determining module is configured to use the working time data as target data if the first identifier and the second identifier are the same.

[0034] The generation module is used to obtain the cycle granularity corresponding to the current working mode if the first identifier and the second identifier are different, and to perform data conversion processing on the working time data according to the cycle granularity to generate target data;

[0035] The processing module is used to process the target data into report data.

[0036] To address the aforementioned technical problems, this application also provides a computer device that employs the following technical solution:

[0037] The memory stores computer-readable instructions, and when the processor executes the computer-readable instructions, it implements the steps of the time data processing method described above.

[0038] To address the aforementioned technical problems, this application also provides a computer-readable storage medium, employing the technical solution described below:

[0039] The computer-readable storage medium stores computer-readable instructions, which, when executed by a processor, implement the steps of the time data processing method described above.

[0040] Compared with the prior art, the embodiments of this application have the following advantages: By acquiring a data query request and the current working mode; wherein the data query request is used to query working hour data; all working hour data corresponding to the data query request are retrieved from the database; a first identifier corresponding to the current working mode and a second identifier corresponding to the working hour data are acquired respectively; if the first identifier and the second identifier are the same, the working hour data is used as the target data; if the first identifier and the second identifier are different, the period granularity corresponding to the current working mode is acquired, and the working hour data is processed according to the period granularity to generate the target data; the target data is processed into report data; by determining whether the working hour data and the current working mode correspond based on the first identifier and the second identifier, it is determined whether their formats are the same, and when their formats are different, the working hour data is processed according to the period granularity to make the working hour data correspond to the format of the current working mode, thus avoiding data migration, realizing flexible switching between project models, and having wide applicability. Attached Figure Description

[0041] To more clearly illustrate the solutions in this application, the accompanying drawings used in the description of the embodiments of this application will be briefly introduced below. Obviously, the accompanying drawings described below are some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0042] Figure 1 This is an exemplary system architecture diagram to which this application can be applied;

[0043] Figure 2 A flowchart of an embodiment of the time data processing method according to this application;

[0044] Figure 3 This is a schematic diagram of the structure of one embodiment of the time data processing apparatus according to this application;

[0045] Figure 4 This is a schematic diagram of the structure of one embodiment of the computer device according to this application. Detailed Implementation

[0046] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application pertains; the terminology used herein in the specification of the application is for the purpose of describing particular embodiments only and is not intended to be limiting of the application; the terms "comprising" and "having," and any variations thereof, in the specification, claims, and foregoing drawings of this application, are intended to cover non-exclusive inclusion. The terms "first," "second," etc., in the specification, claims, or foregoing drawings of this application are used to distinguish different objects, not to describe a particular order.

[0047] In this document, the term "embodiment" means that a particular feature, structure, or characteristic described in connection with an embodiment may be included in at least one embodiment of this application. The appearance of this phrase in various places throughout the specification does not necessarily refer to the same embodiment, nor is it a separate or alternative embodiment mutually exclusive with other embodiments. It will be explicitly and implicitly understood by those skilled in the art that the embodiments described herein can be combined with other embodiments.

[0048] To enable those skilled in the art to better understand the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings.

[0049] like Figure 1 As shown, system architecture 100 may include terminal devices 101, 102, and 103, a network 104, and a server 105. Network 104 serves as the medium for providing communication links between terminal devices 101, 102, and 103 and server 105. Network 104 may include various connection types, such as wired or wireless communication links, or fiber optic cables, etc.

[0050] Users can use terminal devices 101, 102, and 103 to interact with server 105 via network 104 to receive or send messages, etc. Various communication client applications can be installed on terminal devices 101, 102, and 103, such as web browser applications, shopping applications, search applications, instant messaging tools, email clients, social media platform software, etc.

[0051] Terminal devices 101, 102, and 103 can be various electronic devices with displays and support web browsing, including but not limited to smartphones, tablets, e-book readers, MP3 players (Moving Picture Experts Group Audio Layer III), MP4 players (Moving Picture Experts Group Audio Layer IV), laptops, and desktop computers, etc.

[0052] Server 105 can be a server that provides various services, such as a backend server that supports the pages displayed on terminal devices 101, 102, and 103.

[0053] It should be noted that the time data processing method provided in the embodiments of this application is generally executed by a server / terminal device, and correspondingly, the time data processing device is generally set in the server / terminal device.

[0054] It should be understood that Figure 1 The number of terminal devices, networks, and servers shown is merely illustrative. Depending on implementation needs, any number of terminal devices, networks, and servers can be included.

[0055] Continue to refer to Figure 2 A flowchart illustrating an embodiment of a time data processing method according to this application is shown. The time data processing method includes the following steps:

[0056] Step S201: Obtain the data query request and the current working mode; wherein, the data query request is used to query working hour data.

[0057] In this embodiment, the time data processing method runs on an electronic device (e.g., Figure 1 The server / terminal device shown can obtain data query requests and the current operating mode through wired or wireless connections. It should be noted that the aforementioned wireless connection methods may include, but are not limited to, 3G / 4G / 5G connections, Wi-Fi connections, Bluetooth connections, Wi-Fi connections, Zigbee connections, UWB (ultra-Width band) connections, and other currently known or future wireless connection methods.

[0058] The user filters the time data acquisition conditions through the terminal (such as mobile phone, tablet, PC, etc.) operation interface to generate the above data query request; the above data acquisition conditions can be based on time and work item as granularity, such as obtaining all time data within time A, or obtaining time data under work item B.

[0059] The current work mode described above represents the current work mode; the current work mode can be a simple mode or a summary mode; in the simple mode, there is a one-to-one correspondence between work items and time data; in the summary mode, one work item corresponds to at least one time data.

[0060] It should be noted that the above working hour data includes the person in charge, the task, and the time parameter; the person in charge is the person who handles the task; the task is the task that the person in charge must handle; the time parameter is the time (such as duration, date, etc.) for the person in charge to handle the task, and the time parameter includes at least one of the start time, end time, and working duration.

[0061] To further clarify, in the above matters, if the current work mode is summary mode, a work item is split into at least one item, which can be understood as decomposing the total task into multiple sub-tasks; if the current work mode is simple mode, then the work item is the same as the item.

[0062] Step S202: Retrieve all working hour data corresponding to the data query request from the database.

[0063] In this embodiment, the database is used to store work hour data, and each work hour data is stored separately according to work item category to facilitate data management and retrieval.

[0064] Initially, the start and end time attribute values ​​are set respectively; receive data storage requests sent by the user, which carry the work time data to be stored;

[0065] If the current work mode is simple mode, and the attribute values ​​of start time and end time both meet the preset values, then the period of the work time data is represented by the start time. At this time, it is determined whether the work data is stored in the work item category of the database. If it is, the work time data to be stored will overwrite the work data in the work item category of the database. If not, the work time data to be stored will be added to the work item category of the database so that the work item category and the work time data in the database are in a one-to-one state.

[0066] If the current work mode is summary mode, and the attribute value of the start time meets the preset value, but the attribute value of the end time does not meet the preset value, then the work time data is characterized as duration data. After calculating the duration of the work time data based on the start and end times, the work time data is split according to the period granularity to obtain multiple sub-work time data. Each sub-work time data is stored as work time data in the work item category corresponding to it in the database. For example, if the period granularity is days and the duration of the work time data is 3 days, then after splitting the duration of the work time data, 3 sub-work time data with a value of 1 day are obtained.

[0067] It should be noted that if the attribute value of the start time does not meet the preset value, it indicates that the work data is abnormal, and a re-entry instruction is sent to the user terminal. After receiving the new work time data to be stored from the user terminal based on the re-entry instruction, the above-mentioned work time data storage steps are repeated.

[0068] Step S203: Obtain the first identifier corresponding to the current working mode and the second identifier corresponding to the working time data.

[0069] In this embodiment, the first identifier represents the current working mode. For example, when the current working mode is simple mode, the first identifier is 1; when the current working mode is summary mode, the first identifier is 2.

[0070] The second identifier mentioned above represents the data format corresponding to the work hour data; if the work hour data is in the simple mode, then the data information of the work hour data is in the simple data format, and the corresponding second identifier is 1; if the work hour data is in the summary mode, then the data information of the work hour data is in the summary data format, and the corresponding second identifier is 2.

[0071] In some embodiments, the second identifier may also be determined by the attribute values ​​of the start time and the end time; if the attribute values ​​of both the start time and the end time satisfy the preset value, the second identifier is determined to be 1; if the attribute value of the start time satisfies the preset value, but the attribute value of the end time does not satisfy the preset value, the second identifier is determined to be 2.

[0072] Step S204: If the first identifier and the second identifier are the same, the working time data is used as the target data.

[0073] In this embodiment, if the first identifier and the second identifier are the same, it indicates that the data storage format of the time data is the same as the data format of the time data required by the current working mode; for example, if the storage format of the time data is a simple data format, the corresponding current working mode is a simple mode; or if the storage format of the time data is a summary data format, the corresponding current working mode is a summary mode.

[0074] Step S205: If the first identifier and the second identifier are different, then obtain the cycle granularity corresponding to the current working mode, perform data conversion processing on the working time data according to the cycle granularity, and generate target data.

[0075] In this embodiment, if the first identifier and the second identifier are different, it indicates that the data storage format of the work hour data is inconsistent with the data format of the work hour data required by the current work mode. At this time, the work hour data needs to be converted to adapt to the work hour data format required by the current work mode. For example, if the storage format of the work hour data is a simple data format and the current work mode is a summary mode, the two are inconsistent; or if the storage format of the work hour data is a summary data format and the corresponding current work mode is a simple mode, the two are inconsistent.

[0076] The aforementioned periodic granularity can be in units of year, month, day, or hour, without specific limitations.

[0077] Step S206: Process the target data into report data.

[0078] In this embodiment, the target data is converted according to the report format to obtain report data; this report data is easy for users to view, such as being displayed in the form of a report table, and the target data is divided into days, so that users can understand the status of their daily work hours.

[0079] The above embodiments of this application have the following advantages: by determining whether the working hour data and the current working mode correspond according to the first identifier and the second identifier, it is determined whether the two formats are the same. When the two formats are different, the working hour data is converted according to the period granularity so that the working hour data corresponds to the format of the current working mode. This avoids data migration, realizes flexible switching between project models, and has wide applicability.

[0080] In some optional implementations, step S205, the step of performing data transformation processing on the time data according to the periodic granularity to generate target data, includes:

[0081] All the time data retrieved are classified according to the work item category to obtain the work item category corresponding to each time data;

[0082] The time data in the work item category is transformed according to the stated periodic granularity to generate target data.

[0083] In this embodiment, the time data is categorized according to the work item type to facilitate subsequent data conversion processing of the time data.

[0084] In practical applications, one work hour data corresponds to one first code, and one work item category corresponds to one second code. If the first code of the work hour data is consistent with the second code of the work item category, it indicates that the work data corresponds to the work item category.

[0085] In some optional implementations, the current working mode is a summary mode, and the data transformation process is a splitting process; the step of performing data transformation processing on the time data in the work item category according to the periodic granularity to generate target data includes:

[0086] The time data in the work item category are split according to the cycle granularity to obtain multiple target data, one of which corresponds to one cycle granularity.

[0087] In this embodiment, when the first identifier and the second identifier are not equal, it indicates that the format of the time data does not correspond to the format of the time data set in the current work mode. If the format of the time data is a simple data format, one work item category corresponds to one time data. The time data in the work item category is split according to the periodic granularity to obtain multiple continuous target data. In this way, the format of the time data is adapted to the format of the summary mode. There is no need to rebuild the project model, migrate a large amount of data, improve the applicability of the project model, and make it more flexible.

[0088] If the cycle granularity is one day and the duration of the work hour data is 3 days, then after splitting the duration of the work hour data, we get 3 sub-work hour data with a value of 1 day, and use the sub-work hour data as the target data.

[0089] In some embodiments, after generating target data, the target data is sent to the user terminal for confirmation. If the user terminal sends a modification instruction, the target data to be modified is determined according to the modification instruction, and the target data to be modified is modified.

[0090] If the target data to be modified is located in the middle of consecutive target data, then the target data to be modified is separated out, and the target data before the target data to be modified is merged, and the target data after the target data to be modified is merged, so as to highlight the target data to be modified and make it easier for users to view. For example, if the period granularity is 1 day, and the consecutive target data are A1, A2, A3, A4, and A5, and the target data to be modified is A3, then A3 is separated out, and A1 and A2 are merged, and A4 and A5 are merged.

[0091] In some optional implementations, the current working mode is a simple mode, and the data transformation process is a merging process; the step of performing data transformation processing on the time data in the work item category according to the periodic granularity to generate target data includes:

[0092] All time data in the work item category are merged according to the said period granularity to obtain target data corresponding to the said period granularity.

[0093] In this embodiment, when the first identifier and the second identifier are not equal, it indicates that the format of the work hour data does not correspond to the format of the work hour data set in the current work mode. If the format of the work hour data is a summary data format, there are multiple work hour data corresponding to one work item category. At this time, the start time and end time of each work hour data are extracted, and the minimum start time and the maximum end time are determined. The work hour duration is calculated based on the minimum start time and the maximum end time as a time parameter, and all work hour data are merged to obtain the target data in a simple data format.

[0094] In some alternative implementations, step S206 above, the step of processing the target data into report data, includes:

[0095] Determine whether the target data is duration data, and obtain the determination result;

[0096] Based on the judgment result, the target data is formatted to obtain the report data.

[0097] In this embodiment, by determining whether the target data is duration data, the format type of the target data is determined to be either simple data format or summary data format, so as to perform corresponding format conversion according to the target data of different format types, so that the format of the target data conforms to the format of the report.

[0098] In some optional implementations, the step of determining whether the target data is duration data and obtaining the determination result includes:

[0099] Extract the start and end times from the target data;

[0100] If the attribute value of the start time meets the first threshold and the attribute value of the end time does not meet the second threshold, then the result of the judgment that the target data is not duration data is obtained.

[0101] If the attribute value of the start time meets the first threshold and the attribute value of the end time does not meet the second threshold, then the result of determining that the target data is duration data is obtained.

[0102] In this embodiment, the first threshold and the second threshold may be the same or different, and no specific limitation is made here.

[0103] The above duration data represents time period data. For example, if the start time is November 4th and the end time is November 7th, then the duration data is 3 days; if the start time is November 4th and the end time is November 4th, then there is no duration data.

[0104] In practical applications, since there is a one-to-one correspondence between work item categories and target data in the simple mode, the target data in the simple mode is not duration data; since there is a one-to-many correspondence between work item categories and target data in the summary mode, the target data in the summary mode is duration data; based on this, it is determined whether the target data needs to be split according to whether the target data is duration data.

[0105] In some optional implementations, the step of converting the target data according to the judgment result to obtain the report data includes:

[0106] If the judgment result indicates that the target data is duration data, the target data is split to obtain multiple sub-target data, and the format of each merged sub-target data is converted to form report data.

[0107] If the judgment result indicates that the target data is not duration data, the target data format will be converted to form report data.

[0108] In this embodiment, after obtaining the target data, the target data is formatted to conform to the format of the report. The formatted data is then input into the report, and the report is rendered to form report data.

[0109] It should be emphasized that, in order to further ensure the privacy and security of the aforementioned working hour data, the aforementioned working hour data can also be stored in a blockchain node.

[0110] The blockchain referred to in this application is a novel application model of computer technologies such as distributed data storage, peer-to-peer transmission, consensus mechanisms, and encryption algorithms. Essentially, a blockchain is a decentralized database, a chain of data blocks linked together using cryptographic methods. Each data block contains information about a batch of network transactions, used to verify the validity of the information (anti-counterfeiting) and generate the next block. A blockchain can include an underlying blockchain platform, a platform product service layer, and an application service layer.

[0111] The embodiments of this application can acquire and process relevant data based on artificial intelligence technology. Artificial intelligence (AI) is the theory, method, technology, and application system that uses digital computers or machines controlled by digital computers to simulate, extend, and expand human intelligence, perceive the environment, acquire knowledge, and use that knowledge to obtain optimal results.

[0112] Foundational technologies for artificial intelligence generally include sensors, dedicated AI chips, cloud computing, distributed storage, big data processing, operating / interactive systems, and mechatronics. AI software technologies mainly encompass computer vision, robotics, biometrics, speech processing, natural language processing, and machine learning / deep learning.

[0113] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by instructing related hardware through computer-readable instructions. These computer-readable instructions can be stored in a computer-readable storage medium. When the program is executed, it can include the processes of the embodiments of the methods described above. The aforementioned storage medium can be a non-volatile storage medium such as a magnetic disk, optical disk, or read-only memory (ROM), or random access memory (RAM).

[0114] It should be understood that although the steps in the flowcharts of the accompanying figures are shown sequentially as indicated by the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the flowcharts of the accompanying figures may include multiple sub-steps or multiple stages. These sub-steps or stages are not necessarily completed at the same time, but can be executed at different times, and their execution order is not necessarily sequential, but can be performed alternately or in turn with other steps or at least some of the sub-steps or stages of other steps.

[0115] Further reference Figure 3 As a response to the above Figure 2 To implement the method shown, this application provides an embodiment of a time data processing device, which is similar to... Figure 2 Corresponding to the method embodiments shown, this device can be specifically applied to various electronic devices.

[0116] like Figure 3As shown, the time data processing device 300 described in this embodiment includes: a first acquisition module 301, a calling module 302, a second acquisition module 303, a determining module 304, and a processing module 306. Wherein:

[0117] The first acquisition module 301 is used to acquire a data query request and the current working mode; wherein, the data query request is used to query working hour data;

[0118] Module 302 is invoked to retrieve all working hour data corresponding to the data query request from the database.

[0119] The second acquisition module 303 is used to acquire the first identifier corresponding to the current working mode and the second identifier corresponding to the working time data respectively;

[0120] The determining module 304 is used to take the working time data as the target data if the first identifier and the second identifier are the same.

[0121] The generation module 305 is used to obtain the cycle granularity corresponding to the current working mode if the first identifier and the second identifier are different, and to perform data conversion processing on the working time data according to the cycle granularity to generate target data;

[0122] The processing module 306 is used to process the target data into report data.

[0123] The above embodiments of this application have the following advantages: by determining whether the working hour data and the current working mode correspond according to the first identifier and the second identifier, it is determined whether the two formats are the same. When the two formats are different, the working hour data is converted according to the period granularity so that the working hour data corresponds to the format of the current working mode. This avoids data migration, realizes flexible switching between project models, and has wide applicability.

[0124] In some optional implementations, the above-mentioned generation module 305 includes a classification submodule and a generation submodule. Wherein:

[0125] The classification submodule is used to classify all the called time data according to the work item category to obtain the work item category corresponding to each time data;

[0126] The generation submodule is used to perform data transformation processing on the time data in the work item category according to the said periodic granularity to generate target data.

[0127] In some optional implementations, the current working mode is a summary mode, and the data transformation process is a splitting process; the above-mentioned generation sub-module includes a splitting unit. Wherein:

[0128] The splitting unit is used to split the time data in the work item category according to the cycle granularity to obtain multiple target data, one of the target data corresponding to one cycle granularity.

[0129] In some optional implementations, the current working mode is simple mode, and the data transformation process is a merging process; the above-mentioned generation submodule includes a merging unit. Wherein:

[0130] The merging unit is used to merge all time data in the work item category according to the said period granularity to obtain target data corresponding to the said period granularity.

[0131] In some optional implementations, the processing module 306 includes a judgment submodule and a format conversion submodule. Wherein:

[0132] The judgment submodule is used to determine whether the target data is duration data and obtain the judgment result;

[0133] The format conversion submodule is used to convert the target data according to the judgment result to obtain the report data.

[0134] In some optional implementations, the above-mentioned judgment submodule includes an extraction unit, a first judgment unit, and a second judgment unit. Wherein:

[0135] The extraction unit is used to extract the start time and end time from the target data;

[0136] The first judgment subunit is used to determine that the target data is not duration data if the attribute value of the start time meets the first threshold and the attribute value of the end time does not meet the second threshold.

[0137] The second judgment subunit is used to determine that the target data is duration data if the attribute value of the start time meets the first threshold and the attribute value of the end time does not meet the second threshold.

[0138] In some optional implementations, the above format conversion submodule includes a first format conversion unit and a second format conversion unit. Wherein:

[0139] The first format conversion unit is used to split the target data into multiple sub-target data when the judgment result is that the target data is duration data, and then convert the format of each of the merged sub-target data to form report data.

[0140] The second format conversion unit is used to convert the target data format into report data if the judgment result is that the target data is not duration data.

[0141] To address the aforementioned technical problems, embodiments of this application also provide a computer device. Please refer to [link / reference needed]. Figure 4 , Figure 4 This is a basic structural block diagram of the computer device in this embodiment.

[0142] The computer device 4 includes a memory 41, a processor 42, and a network interface 43 that are interconnected via a system bus. It should be noted that only the computer device 4 with components 41-43 is shown in the figure; however, it should be understood that it is not required to implement all the shown components, and more or fewer components can be implemented alternatively. Those skilled in the art will understand that the computer device described here is a device capable of automatically performing numerical calculations and / or information processing according to pre-set or stored instructions, and its hardware includes, but is not limited to, microprocessors, application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), digital signal processors (DSPs), embedded devices, etc.

[0143] The computer device can be a desktop computer, laptop, handheld computer, or cloud server, etc. The computer device can interact with the user via a keyboard, mouse, remote control, touchpad, or voice control.

[0144] The memory 41 includes at least one type of readable storage medium, including flash memory, hard disk, multimedia card, card-type memory (e.g., SD or DX memory), random access memory (RAM), static random access memory (SRAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), programmable read-only memory (PROM), magnetic memory, magnetic disk, optical disk, etc. In some embodiments, the memory 41 may be an internal storage unit of the computer device 4, such as the hard disk or memory of the computer device 4. In other embodiments, the memory 41 may also be an external storage device of the computer device 4, such as a plug-in hard disk, smart media card (SMC), secure digital (SD) card, flash card, etc., equipped on the computer device 4. Of course, the memory 41 may include both the internal storage unit and its external storage device of the computer device 4. In this embodiment, the memory 41 is typically used to store the operating system and various application software installed on the computer device 4, such as computer-readable instructions for time data processing methods. In addition, the memory 41 can also be used to temporarily store various types of data that have been output or will be output.

[0145] In some embodiments, the processor 42 may be a central processing unit (CPU), a controller, a microcontroller, a microprocessor, or other data processing chip. The processor 42 is typically used to control the overall operation of the computer device 4. In this embodiment, the processor 42 is used to execute computer-readable instructions stored in the memory 41 or to process data, for example, to execute computer-readable instructions for the time data processing method.

[0146] The network interface 43 may include a wireless network interface or a wired network interface, which is typically used to establish communication connections between the computer device 4 and other electronic devices.

[0147] The above embodiments of this application have the following advantages: by determining whether the working hour data and the current working mode correspond according to the first identifier and the second identifier, it is determined whether the two formats are the same. When the two formats are different, the working hour data is converted according to the period granularity so that the working hour data corresponds to the format of the current working mode. This avoids data migration, realizes flexible switching between project models, and has wide applicability.

[0148] This application also provides another embodiment, namely, providing a computer-readable storage medium storing computer-readable instructions that can be executed by at least one processor to cause the at least one processor to perform the steps of the time data processing method described above.

[0149] The above embodiments of this application have the following advantages: by determining whether the working hour data and the current working mode correspond according to the first identifier and the second identifier, it is determined whether the two formats are the same. When the two formats are different, the working hour data is converted according to the period granularity so that the working hour data corresponds to the format of the current working mode. This avoids data migration, realizes flexible switching between project models, and has wide applicability.

[0150] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods of the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk), and includes several instructions to cause a terminal device (which may be a mobile phone, computer, server, air conditioner, or network device, etc.) to execute the methods described in the various embodiments of this application.

[0151] Obviously, the embodiments described above are only some embodiments of this application, not all embodiments. The accompanying drawings show preferred embodiments of this application, but do not limit the patent scope of this application. This application can be implemented in many different forms; rather, the purpose of providing these embodiments is to provide a more thorough and comprehensive understanding of the disclosure of this application. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art can still modify the technical solutions described in the foregoing specific embodiments, or make equivalent substitutions for some of the technical features. Any equivalent structures made using the content of this application's specification and drawings, directly or indirectly applied to other related technical fields, are similarly within the scope of patent protection of this application.

Claims

1. A method for processing time data, characterized in that, Includes the following steps: Obtain the data query request and the current working mode; wherein, the data query request is used to query working hour data; Retrieve all working hour data corresponding to the data query request from the database; Obtain the first identifier corresponding to the current working mode and the second identifier corresponding to the working time data, respectively; If the first identifier and the second identifier are the same, the working time data will be used as the target data; If the first identifier and the second identifier are different, then the cycle granularity corresponding to the current working mode is obtained, and the working time data is processed according to the cycle granularity to generate target data; The step of performing data transformation processing on the working time data according to the said periodic granularity to generate target data includes: All the time data called are classified according to the work item category to obtain the work item category corresponding to each time data. Each time data corresponds to a first code, and each work item category corresponds to a second code. If the first code of the time data is consistent with the second code of the work item category, it indicates that the time data corresponds to the work item category. The time data in the work item category is transformed according to the said periodic granularity to generate target data; Wherein, the current working mode is the summary mode, and the data transformation processing is the split processing; the step of performing data transformation processing on the time data in the work item category according to the period granularity to generate target data includes: The time data in the work item category are split according to the cycle granularity to obtain multiple target data, one of the target data corresponding to one cycle granularity; Wherein, the current working mode is simple mode, and the data conversion process is merging process; the step of performing data conversion processing on the time data in the work item category according to the period granularity to generate target data includes: All time data in the work item category are merged according to the cycle granularity to obtain target data corresponding to the cycle granularity; The target data is processed into report data.

2. The time data processing method according to claim 1, characterized in that, The step of processing the target data into report data includes: Determine whether the target data is duration data, and obtain the determination result; Based on the judgment result, the target data is formatted to obtain the report data.

3. The time data processing method according to claim 2, characterized in that, The step of determining whether the target data is duration data and obtaining the determination result includes: Extract the start and end times from the target data; If the attribute value of the start time meets the first threshold and the attribute value of the end time does not meet the second threshold, then the result of the judgment that the target data is not duration data is obtained. If the attribute value of the start time meets the first threshold and the attribute value of the end time does not meet the second threshold, then the result of determining that the target data is duration data is obtained.

4. The time data processing method according to claim 3, characterized in that, The step of converting the target data according to the judgment result to obtain the report data includes: If the judgment result indicates that the target data is duration data, the target data is split to obtain multiple sub-target data, and the format of each merged sub-target data is converted to form report data. If the judgment result indicates that the target data is not duration data, the target data format will be converted to form report data.

5. A time data processing device, characterized in that, include: The first acquisition module is used to acquire data query requests and the current working mode; wherein, the data query request is used to query working hour data; The calling module is used to retrieve all working hour data corresponding to the data query request from the database; The second acquisition module is used to acquire the first identifier corresponding to the current working mode and the second identifier corresponding to the working time data, respectively. The determining module is configured to use the working time data as target data if the first identifier and the second identifier are the same. The generation module is used to obtain the cycle granularity corresponding to the current working mode if the first identifier and the second identifier are different, and to perform data conversion processing on the working time data according to the cycle granularity to generate target data; The generation module is further configured to classify all the called time data according to the work item category to obtain the work item category corresponding to each time data, wherein one time data corresponds to a first code, and one work item category corresponds to a second code. If the first code of the time data is consistent with the second code of the work item category, it indicates that the time data corresponds to the work item category. The module also performs data transformation processing on the time data in the work item category according to the period granularity to generate target data. The generation module is further configured to: use the current working mode as the summary mode and the data conversion processing as the splitting processing; split the working hour data in the work item category according to the period granularity to obtain multiple target data, where one of the target data corresponds to one period granularity; The generation module is further configured such that the current working mode is simple mode and the data conversion processing is merging processing; and to merge all time data in the work item category according to the cycle granularity to obtain target data corresponding to the cycle granularity. The processing module is used to process the target data into report data.

6. A computer device comprising a memory and a processor, the memory storing computer-readable instructions, wherein the processor, when executing the computer-readable instructions, implements the steps of the time data processing method as described in any one of claims 1 to 4.

7. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer-readable instructions, which, when executed by a processor, implement the steps of the time data processing method as described in any one of claims 1 to 4.

Citation Information

Patent Citations

  • Granularity data processing method and device

    CN111552722A

  • Project cost and working hour management method and system

    CN114154967A