A time information processing method and apparatus, computing device, and storage medium

By injecting a time conversion object into the operating system and using dynamic link libraries and hook technology to intercept time acquisition requests, the problem of the single time acquisition method in the existing technology is solved, which realizes flexible time acquisition and acceleration, improves the testing and usage efficiency of software applications, and reduces the risk of system crashes.

CN115712468BActive Publication Date: 2026-06-16XFUSION DIGITAL TECH CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
XFUSION DIGITAL TECH CO LTD
Filing Date
2022-09-30
Publication Date
2026-06-16

AI Technical Summary

Technical Problem

Existing methods for obtaining time are limited in software applications and cannot cover scenarios requiring a specific time or accelerated time. This results in the inability to meet needs in special scenarios and may affect system stability.

Method used

By designing time conversion and time acquisition objects, and using dynamic link libraries and hook technology to inject time conversion objects into the operating system, time acquisition requests are intercepted and converted, providing flexible time acquisition methods, supporting specified time or time acceleration, and avoiding code modification of software applications.

🎯Benefits of technology

It enables flexible acquisition of specified time or acceleration time without changing the software application code, improving testing efficiency, reducing the risk of system crashes, and meeting various time control needs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115712468B_ABST
    Figure CN115712468B_ABST
Patent Text Reader

Abstract

Embodiments of the present application disclose a time information processing method and device, a computing device and a storage medium. The method comprises: in response to a time query event generated for a task object, generating a time acquisition request and sending the time acquisition request in an operating system running the task object; receiving a task time returned in response to the time acquisition request; and processing the task object according to the task time. If a time conversion object is enabled in the operating system, the task time comprises a conversion time obtained by the time conversion object injected in the operating system; the conversion time is obtained by converting a reference time according to a conversion rule. If the time conversion object is not enabled in the operating system, the task time comprises a reference time obtained by a time acquisition object; the reference time is different from the conversion time. According to the present application, time can be flexibly provided for a software object, including providing a converted time or a reference time.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of computing device technology, and in particular to a time information processing method, apparatus, computing device, and storage medium. Background Technology

[0002] With the development of computer technology, various software applications can be developed using multiple programming languages, greatly facilitating people's production and daily lives. Many of these applications include time-based functions, such as periodic data dumping, timed alarms, license expiration detection, daylight saving time switching, password change reminders, and time zone conversion calculations in equipment management software systems. These functions are triggered by obtaining the system time provided by the operating system.

[0003] Existing methods for obtaining time generally involve software applications automatically reading the system time of the operating system on which the software application resides through their program code. This method is limited and cannot cover certain special scenarios, such as those that require specifying a time or accelerating the time. Summary of the Invention

[0004] This application provides a time information processing method, apparatus, computing device, and storage medium, which can flexibly provide time for software objects.

[0005] In a first aspect, embodiments of this application provide a time information processing method, which can be applied to a computing device capable of running software applications. The method includes: in response to a time query event generated for a task object, generating a time acquisition request and sending the time acquisition request in the operating system running the task object; receiving a task time returned in response to the time acquisition request; and processing the task object according to the task time. Wherein, if a time conversion object is enabled in the operating system, the task time includes: a conversion time obtained through a time conversion object injected into the operating system; the conversion time is obtained by converting a reference time according to conversion rules; if a time conversion object is not enabled in the operating system, the task time includes: a reference time obtained through a time acquisition object; the reference time is different from the conversion time.

[0006] In this technical solution, two objects for obtaining time are designed: a time conversion object and a time acquisition object. For example, two time functions that can obtain different times. When a task object in the software application needs to obtain time, different times can be obtained by enabling or disabling the time conversion object, making the time acquisition method more flexible. Finally, the flexible reference time or the converted time can be used as the task time to respond to time query events.

[0007] In one possible implementation, if a time conversion object is injected into the operating system, it is determined that the time conversion object is enabled in the operating system. The time conversion object can be used to intercept time acquisition requests that call the time acquisition object, and the conversion time can be obtained through the time conversion object; wherein, the time acquisition object is used to obtain a base time as a reference time.

[0008] In this technical solution, a specially designed time conversion object is used so that once the time conversion object is injected into the operating system, it can automatically intercept time acquisition requests and provide feedback on the modified time after time conversion. In some time modification scenarios, no code modification is required for the software application being used or tested, and there is no intrusion into the software application, which greatly facilitates the use or testing of software applications that need to modify or accelerate time.

[0009] In one possible implementation, sending the time acquisition request in the operating system running the task object includes: determining the time control policy of the task object corresponding to the time query event; if it is a first policy, then it is determined that no time conversion object is enabled in the operating system, and a time acquisition request can be sent to the time acquisition object in the operating system running the task object to obtain a reference time; if it is a second policy, then it is determined that a time conversion object is enabled in the operating system, and a time acquisition request can be sent to the time conversion object injected in the operating system running the task object to obtain the converted time.

[0010] In this technical solution, when initiating a time acquisition request, the time control strategy of the task object can be determined to dynamically determine whether a time conversion object that can modify and convert time is enabled. Simply put, the time control strategy mainly indicates whether time conversion and modification are required or not. This can be achieved by the user through application tools and other means. In this way, the time acquisition method of the task object is more flexible and can better meet the user's needs for the automation and intelligence of the time control of the task object.

[0011] In one possible implementation, the base time is determined based on the system time of the operating system running the task object, and the conversion time includes any of the following times:

[0012] The specified time is obtained by converting the system time of the operating system, wherein the conversion rule refers to the rule for converting the system time into the specified time;

[0013] The acceleration time is obtained by performing time acceleration calculations on the system time of the operating system. The conversion rule refers to the rule for conversion calculations based on the time acceleration factor.

[0014] In this technical solution, the time conversion object can directly convert the system time into a user-specified time. This satisfies the needs of some timer task objects, such as alarm clock tasks, which can ring directly at the specified time to test whether the alarm clock can work on time. It can also accelerate the system time; for example, some periodic task objects can accelerate the original cycle of one week to one minute to meet the cycle time requirement. This time conversion method can cover a wide range of testing needs. During testing, it eliminates the need to wait for the specified time or for excessively long time periods, allowing for rapid test completion and improving testing efficiency. It also significantly reduces the possibility of system crashes caused by modifying the system time to achieve a specified time, as well as the potential adverse impact on the normal operation of other software applications.

[0015] In one possible implementation, the specified time is obtained through a user interface configured to configure the time conversion object; or, the time acceleration factor is obtained through a user interface configured to configure the time conversion object, and the conversion time is calculated based on the system time, the target time, and the time acceleration factor.

[0016] In this technical solution, the specified time and time acceleration factor can be set through the user interface, which greatly facilitates the testing of software applications or the time acquisition needs of users. Various specified times or acceleration methods can be set to suit software applications with different time acquisition needs.

[0017] In one possible implementation, the method further includes: receiving a dynamic link library and an injection module object for loading the dynamic link library; loading the dynamic link library into the address space of the process of the task object through the injection module object to obtain the time conversion object.

[0018] In this technical solution, in addition to the corresponding dynamic link library, a dedicated injection module object is also designed. This injection module object loads the dynamic link library into the corresponding address space. This ensures that the time conversion object is correctly injected into the operating system without requiring intrusive code modifications to the software application. The dynamic link library and injection module object can be reused in different test software, and the relevant parameters can be adjusted using the aforementioned user interface to meet the testing requirements of different test software.

[0019] In one possible implementation, the dynamic link library is selected from an object set based on the object type of the task object. The object set includes multiple dynamic link libraries, and the time conversion rules for different dynamic link libraries are different.

[0020] In this technical solution, dynamic link libraries, or time conversion objects, can be injected into the operating system as needed. Different object types can automatically load different dynamic link libraries. For example, timer task objects only need to inject a dynamic link library that can convert the system time into the timer's specified time, while periodic task objects that require time acceleration need to enable a dynamic link library that can perform time acceleration conversion. This satisfies the automation and intelligent requirements of time acquisition for task objects with time conversion needs.

[0021] In one possible implementation, the dynamic link library includes: a hook function object built based on hook technology and a time function object for converting the base time according to conversion rules; the hook function object is used to intercept time acquisition requests that call the time acquisition object, and convert the base time according to conversion rules through the time function object.

[0022] This technical solution incorporates a special dynamic link library that can intercept time acquisition requests and perform time conversion, conveniently providing the converted time to task objects that require time conversion without modifying the code of the software application containing the task object.

[0023] In one possible implementation, before processing the task object according to the task time, the method further includes: determining whether the task time meets the processing conditions of the task object; if yes, then performing the step of processing the task object according to the task time; if no, then detecting a time query event generated for the task object in order to perform the step of generating a time acquisition request in response to the time query event generated for the task object.

[0024] In this technical solution, the returned task time is judged to determine whether the task object should be processed. For example, whether the returned specified time is the specified time of the alarm clock timer. If so, the alarm clock ringing is executed. Or, whether the returned accelerated time reaches the cycle length of the cycle dump. If the accelerated time reaches the required cycle length, the data is dumped. This realizes intelligent processing of task objects. Especially in the scenario of time conversion to time acceleration, it can be applied to time acceleration of different cycle lengths.

[0025] Secondly, embodiments of this application also provide a time information processing method that can be applied in a computing device. This method utilizes a management tool for managing the processes of software applications to process time information. The method includes: obtaining a dynamic link library and an injection module object for loading the dynamic link library; sending an injection request to the operating system running the task object, wherein the injection request triggers the operating system to execute the injection module object; loading the dynamic link library into the address space of the task object's process through the injection module object to obtain a time conversion object; and using the time conversion object to convert a base time according to conversion rules to obtain a converted time.

[0026] In this technical solution, in addition to the corresponding dynamic link library, a dedicated injection module object is also designed. This injection module object loads the dynamic link library into the corresponding address space. This ensures that the time conversion object is correctly injected into the operating system to achieve time conversion without requiring intrusive code modifications to the software application. The dynamic link library and injection module object can be reused in different test software to meet the testing requirements of different software.

[0027] In one possible implementation, the method further includes: loading a dynamic link library and an injection module object for loading the dynamic link library into the operating system, so that the dynamic link library is loaded into the address space of the process of the task object after the injection request is initiated; and generating an uninstallation request when an uninstallation event of the loaded dynamic link library is detected, the uninstallation request being used to trigger the operating system to execute the injection module object, and uninstalling the dynamic link library from the address space of the process of the task object through the injection module object.

[0028] In this technical solution, the dynamic link library and the injection module object can be transferred to the operating system through the injection module object, so that the dynamic link library can be loaded or unloaded through the injection module object. No code modification is required for the software application corresponding to the task object. In the absence of intrusion, functions such as injection and unloading of time modification function objects can be implemented.

[0029] In one possible implementation, the dynamic link library includes: a hook function object built based on hook technology and a time function object for converting the base time according to conversion rules; the hook function object is used to intercept time acquisition requests that call the time acquisition object, and convert the base time according to conversion rules through the time function object.

[0030] This technical solution incorporates a special dynamic link library that can intercept time acquisition requests and perform time conversion, conveniently providing the converted time to task objects that require time conversion without modifying the code of the software application containing the task object.

[0031] In one possible implementation, the method further includes: displaying a user interface; the user interface includes any one or more of the following: a display item for displaying process information of the task object, a configuration item for configuring a specified time for the time conversion object, and a configuration item for configuring a time acceleration factor for the time conversion object, wherein the conversion time is calculated based on the system time, the target time, and the time acceleration factor.

[0032] The user interface greatly facilitates the management and monitoring of related software application processes, and allows for the configuration of time conversion, enabling the configuration of different specified times and time accelerations, thus meeting the time conversion needs of task objects in various software applications.

[0033] Thirdly, embodiments of this application also provide a time information processing apparatus. This apparatus has the capability to execute some or all of the steps described in the examples of the methods described in the first aspect or the second aspect. For example, the apparatus may have the function of executing relevant steps in some or all of the embodiments of this application, or it may have the function of executing the steps in any one embodiment of this application individually. In this apparatus, the relevant steps and functions can be implemented by hardware, or by hardware executing corresponding software. The hardware or software includes one or more units or modules corresponding to the above functions.

[0034] In one implementation, the time information processing device may include a processing unit and a communication unit. The processing unit is configured to support the device in performing the corresponding steps of the method described above. The communication unit is used to support any communication needs that may be involved. The time information processing device may also include a storage unit coupled to the processing unit and the communication unit, which stores necessary computer programs and data.

[0035] Fourthly, embodiments of this application also provide a computing device, which includes a processor. This computing device, through the processor, has the capability to execute some or all of the steps described in the examples of the methods described in the first aspect or the examples described in the second aspect. For example, through the processor, the computing device may have the function of executing relevant steps in some or all of the embodiments of this application, or it may have the function of executing the steps in any one embodiment of this application individually. The relevant steps and functions can be implemented in hardware, or they can be implemented by hardware executing corresponding software.

[0036] In one implementation, the computing device may further include a communication interface, such as a network port, to support potential communication needs. The computing device may also include a memory coupled to the processor and the communication interface, which stores necessary computer programs and data. Attached Figure Description

[0037] Figure 1 This is a schematic diagram of an architecture for time information processing according to an embodiment of this application;

[0038] Figure 2 This is a schematic flowchart of a method for processing time information according to an embodiment of this application;

[0039] Figure 3 This is a flowchart illustrating another time information processing method in an embodiment of this application;

[0040] Figure 4 This is a schematic diagram of the structure for managing the use or testing of software applications according to an embodiment of this application;

[0041] Figure 5 This is a flowchart illustrating another time information processing method according to an embodiment of this application;

[0042] Figure 6 This is a schematic diagram of a user interface according to an embodiment of this application;

[0043] Figure 7 This is a schematic diagram of the structure of a time information processing device according to an embodiment of this application;

[0044] Figure 8 This is a schematic diagram of another time information processing device according to an embodiment of this application;

[0045] Figure 9 This is a schematic diagram of the structure of a computing device according to an embodiment of this application. Detailed Implementation

[0046] To better understand the technical solutions provided in the embodiments of this application, the relevant embodiments of this application are described below.

[0047] During the testing or use of a software application, the operating system allocates services / processes to the application for execution; hereinafter, "process" will be used for brief description. This application's embodiments can provide suitable task times for time-based functional application objects (or task objects) included in these software applications, thereby meeting the user's usage or testing needs for these task objects. In this application's embodiments, two objects used to obtain time can be used to meet the different time requirements of the software application's users or testers.

[0048] The two objects mentioned for obtaining time can be referred to as a time acquisition object and a time conversion object, which can be represented by two time functions. The time acquisition object can be any of all time API functions provided by the operating system, such as the operating system's `GetSystemTimeAsFileTime` function (a time acquisition function). The time conversion object, on the other hand, can be a specially designed and loaded custom time API function, which can be named `Hook_GetSystemTimeAsFileTime`. In this embodiment, on the one hand, the time conversion object can inject the corresponding dynamic link library into the address space of the process where the task object resides through dynamic link library injection technology, making it convenient for the task object's process to call it when needed. On the other hand, the time conversion object can hook all time API functions provided by the operating system (including hooking the aforementioned time acquisition object) through hooking technology and redirect to the `Hook_GetSystemTimeAsFileTime` function, thereby obtaining the modified and converted time. Hooking, also known as hook technology, involves capturing messages sent to a target function before the system calls it. The hook function then gains control and can process (change) the execution behavior of the message, resulting in a different outcome from the target function's. In short, hooking is a technique for intercepting information, changing the program's execution flow, and adding new features.

[0049] For the conversion rules involved in the time conversion object, you can set a specified time, accelerate the time conversion, or perform other conversions as needed. In this way, you can convert the base time obtained from the operating system's system time or other methods to a specified time or an accelerated time, depending on usage or testing requirements.

[0050] By using two objects to obtain time, users or testers of the software application can flexibly obtain the time feedback from these two objects and respond flexibly to time query events. This satisfies the need for time-sensitive tasks within the software to specify or accelerate processing, without requiring manual modification of the operating system's system time, thus improving the efficiency of software application usage and testing. Furthermore, designing a dedicated time conversion object without adding new code to the software application for time modification saves development costs for time-sensitive applications. The dedicated time conversion object also, to a certain extent, ensures the versatility of time modification, allowing for time conversion and modification across different software applications.

[0051] In one embodiment, please refer to Figure 1 This is a schematic diagram of a time information processing architecture according to an embodiment of this application. The architecture includes two parts: a management tool 101 for managing the use or testing of software applications, and a process 102 running the software applications. The management tool 101 can load time conversion objects into the address space corresponding to the process 102 when needed. The address space of a process is essentially a data structure. A process contains code, data, and related data structures maintained by the operating system. By loading the time conversion object into the address space of the process, the time conversion object becomes part of the process, thereby facilitating quick invocation of the time conversion object to complete the time conversion and obtain the appropriate conversion time.

[0052] Management tool 101 and process 102 can run on the operating system of a computing device. The operating system sets up process 102 for software applications that include one or more time-sensitive task objects, while management tool 101 can be started according to the needs of the user or test user and can communicate with process 102. Of course, management tool 101 and process 102 can also run on the operating systems of different computing devices. Different computing devices establish data connections through wired or wireless means to enable communication between management tool 101 and process 102.

[0053] After a user or test user starts a software application containing time-sensitive task objects, the operating system allocates a process for the application. In S101, the process runs the software application, and during this process, it executes a task object within the application that requires time conversion. In S102, when the process detects a time query event for the target task object in the software application, it generates a time acquisition request, and in S103, it sends the time acquisition request to the operating system running the task object. Generally, this time acquisition request is used to call an operating system method to obtain the system time; it can also be considered as being used to call the aforementioned time acquisition object (such as...). Figure 1 (As shown by the dashed line), so that the process can respond to the time query event of the target task object according to the system time. If the custom dynamic link library (i.e., time conversion object) of this embodiment is not injected at this time, the process will receive the reference time obtained through the time acquisition object (e.g., ...). Figure 1 (As shown by the dashed line in the middle), and process the task object according to the reference time. The reference time can refer to the operating system's system time, or the time provided by other servers or time synchronization devices.

[0054] When a user or tester of the software application wants to modify the time required for a target task object within the software application, a custom dynamic link library can be injected into the process's address space in step S104 using dynamic link library injection technology. This custom dynamic link library is the aforementioned time conversion object. In this embodiment, the custom dynamic link library is a DLL file on the Windows platform and an SO file on the Linux platform. Step S104 can be executed at any time before sending the time acquisition request. After generating and sending the time acquisition request, step S105 can be executed. If step S104 is executed after sending the time acquisition request, then step S105 will be executed after another time query event for the target task object in the software application is detected and a time acquisition request is generated.

[0055] In S105, the time conversion object intercepts the time acquisition request used to call the time acquisition object based on hook technology, obtains the conversion time through the time conversion object, and feeds back the obtained conversion time to the process so that the process can respond to the time query event of the target task object according to the conversion time.

[0056] When the custom dynamic link library of this application embodiment is injected, since the time acquisition request is intercepted, the task time ultimately returned to the process is the converted time obtained by the time conversion object injected in the operating system; and the converted time is obtained by converting the base time according to the conversion rules. The process will receive the converted time obtained through the time conversion object and process the task object according to the converted time.

[0057] In one embodiment, in S106, the time conversion object can obtain the system time by calling an operating system method (e.g., calling the time acquisition object), and then convert the obtained system time to obtain the converted time.

[0058] The custom dynamic link library, or time conversion object, can be written as needed to implement different conversion rules. In some embodiments, the conversion rule refers to the rule for converting the system time into a specified time, so the time conversion object can convert the operating system's system time to obtain the specified time; or, the conversion rule refers to the rule for conversion calculation according to a time acceleration factor, so the time conversion object can calculate the accelerated time by performing time acceleration on the operating system's system time.

[0059] In this embodiment, a specially configured time conversion object loaded based on a dynamic link library automatically provides time modification functionality for task objects after successful injection. This enables time reprocessing based on the test scenario, such as accelerating time elapsed, specifying and modifying time, and quickly constructing test scenarios. Using dynamic link library injection to achieve non-intrusive time control over single or multiple task objects not only improves the efficiency of time conversion but also effectively reduces system crashes or other software application errors caused by manual modification of system time. Furthermore, the time conversion object can be handled independently through loading and unloading, quickly restoring the operating system's time environment. Moreover, the time conversion object is a general-purpose, cross-platform time control program that can provide the function of modifying the time required by task objects across multiple platforms.

[0060] Please see again Figure 2 This is a schematic flowchart illustrating a method for processing time information according to an embodiment of this application. The method can be executed on a computing device used to run software applications, which uses an operating system to allocate processes to run the software applications. The method of this embodiment includes the following steps.

[0061] S201: Run the software application, and a time-based task object in the software application is started; the task object may be, for example, a data periodic dump task that performs data dump processing, a timed alarm task that performs timed alarm function, etc.

[0062] S202: Detect time query events generated for task objects; task objects can generate time query events by initiating time retrieval requests to request the required time, and then determine whether to execute corresponding processing such as timed functions or periodic dump functions.

[0063] S203: Determine the time control strategy of the task object corresponding to the time query event. When a time query event occurs, such as when some timer task objects or periodic data processing task objects need to obtain the operating system's system time, the first step in this embodiment is to determine the time control strategy of the task object corresponding to the time query event. After determining the time control strategy, the task time is obtained according to the determined time control strategy. Different time control strategies will obtain different task times.

[0064] The time control strategies mentioned in this application mainly include: a strategy that does not require time modification (which can be simply referred to as the first strategy) and a strategy that requires time modification (which can be simply referred to as the second strategy). If the time control strategy is the first strategy, then the following S204 is executed, that is, in the operating system running the task object, a time acquisition request is sent to the time acquisition object, and the obtained task time is: a reference time obtained through the time acquisition object, which can be a function object used to obtain the system time of the operating system where the task object is located. The reference time can be the system time of the operating system.

[0065] If the time control strategy is the second strategy, then the following S205 is executed, that is, in the operating system running the task object, a time acquisition request is sent to the time conversion object injected in the operating system, and the acquired task time is: the conversion time obtained through the time conversion object; the reference time is different from the conversion time.

[0066] In one embodiment, the conversion time is obtained by converting a base time according to a conversion rule. This base time can refer to the system time of the operating system running the task or other standard time. Similarly, the reference time can also refer to the system time of the operating system running the task or other standard time. Other standard times include times obtained from other servers or devices that can provide time.

[0067] In one embodiment, the specific judgment process in S203 can determine the time control strategy by judging whether a time conversion object exists in the address space of the current process. If a time conversion object exists, the time control strategy is determined to be the second strategy; otherwise, it is the first strategy. Alternatively, in another embodiment, the user or tester of the software application can actively send a notification message to the process through the aforementioned management tool, notifying the process that the current time control strategy for the task object is the second strategy. If the process does not receive the notification message sent by the management tool or receives other forms of notification messages (for example, the first notification message is used when the time control strategy is the second strategy, and the second notification message is used when the time control strategy is the first strategy), then the current time control strategy for the task object is considered to be the first strategy.

[0068] S204: Receive the reference time obtained from the time acquisition object. This reference time can be the currently recorded system time TA or a base time TA. Use the reference time as the task time.

[0069] S205: Triggering the time conversion object to obtain the conversion time. There are several ways for the time conversion object to obtain the conversion time. One method is to first obtain the current base time TA, and then directly convert the base time TA to another specified time TB, which is the conversion time. Another method is to obtain the accelerated time T by performing time acceleration calculations on the operating system's system time. In one embodiment, the rule for performing conversion calculations according to the time acceleration factor can refer to the following formula.

[0070] T = TA + (TB - TA) × K, where T is the conversion time, TA is the base time, TB is the desired time, and K is the time acceleration factor.

[0071] S206: Receive the conversion time obtained from the time conversion object. In this case, the conversion time will be used as the task time.

[0072] In one embodiment, when the second strategy is determined, the process can call a time conversion object in the address space. This time conversion object intercepts the GetSystemTimeAsFileTime (the function for obtaining time) in the operating system through hook technology and redirects it to the Hook_GetSystemTimeAsFileTime (time conversion object) method, thereby obtaining the converted time.

[0073] S207: Determine whether the task time meets the processing conditions of the task object; if yes, execute S208 below. If no, execute S202 above. S207 mainly determines whether the task time meets the timed processing conditions or periodic processing conditions, such as whether the task time has reached the time set by the timer. If yes, execute timed-related functions, such as the function of a timed alarm clock.

[0074] S208: Process the task object according to the task time.

[0075] This application embodiment possesses the beneficial effects brought about by the time conversion object mentioned above. Furthermore, this application embodiment differs from the previous embodiment in that: in this application embodiment, the process can dynamically determine the time control strategy for the currently running task object by communicating with management tools, which greatly facilitates convenient switching between obtaining the base time or reference time and obtaining the modified and converted time.

[0076] Please see again Figure 3 This is a flowchart illustrating another time information processing method in this application embodiment. The method described in this application embodiment is executed by an operating system-allocated process in a computing device. The method specifically includes the following steps.

[0077] S301: In response to a time query event generated for a task object, generate a time acquisition request and send the time acquisition request in the operating system running the task object.

[0078] S302: Receive the task time returned in response to the time acquisition request. Wherein, if a time conversion object is enabled in the operating system, the task time includes: a conversion time obtained through the time conversion object injected into the operating system; the conversion time is obtained by converting a reference time according to conversion rules; if a time conversion object is not enabled in the operating system, the task time includes: a reference time obtained through the time acquisition object; the reference time is different from the conversion time.

[0079] In one embodiment, if a time conversion object is injected into the operating system, it can be considered that the time conversion object is enabled in the operating system. In this case, the time conversion object intercepts the time acquisition request used to call the time acquisition object, and the conversion time is obtained through the time conversion object. That is, if a time conversion object is injected into the operating system, S302 specifically includes: receiving the conversion time obtained through the time conversion object as the task time. If there is no time conversion object in the operating system, it can be considered that the time conversion object is not enabled in the operating system. In this case, S302 specifically includes: receiving the reference time obtained through the time acquisition object as the task time. That is, after injecting a time conversion object into the operating system (or injecting a time conversion object into the address space of the process corresponding to the task object, which can also be called a custom time API function or a custom dynamic link library), since the time conversion object can be intercepted using hook technology, only the conversion time obtained by the time conversion object can be received in S302. If no time conversion object is injected, the reference time returned by the system time function (also called the time acquisition object) can be obtained directly.

[0080] In another embodiment, after detecting a time query event for a task object or after generating a time acquisition request, the process can also actively determine the time control policy of the task object corresponding to the time query event. If it is the first policy, it can be assumed that the time conversion object is not enabled in the operating system. In this case, the operating system running the task object sends a time acquisition request to the time acquisition object to obtain a reference time. If it is the second policy, it can be assumed that the time conversion object is enabled in the operating system. In this case, the operating system running the task object sends a time acquisition request to the time conversion object injected in the operating system to obtain the converted time.

[0081] The time control strategy for actively determining the task object corresponding to the time query event can include various methods. For example, a process can determine whether it has received a notification message from a management tool used to manage the process. If such a notification message is received, the time control strategy is determined to be the second strategy; otherwise, the first strategy is used. Another example is that a process can determine whether a time conversion object exists in its own address space within the operating system. If it exists, the time control strategy is determined to be the second strategy; otherwise, the first strategy is used.

[0082] In one embodiment, the base time is determined based on the system time of the operating system running the task object. The conversion time includes: a specified time obtained by converting the operating system's system time, where the conversion rule refers to a rule for converting the system time to the specified time; and an accelerated time obtained by performing time acceleration calculations on the operating system's system time, where the conversion rule refers to any one of the rules for conversion calculations based on a time acceleration factor. In other embodiments, the base time can also be other times, such as the time provided by other application servers or the time provided by a time synchronization system.

[0083] In one embodiment, the specified time is configured through a user interface for configuring the time conversion object; or, the time acceleration factor is configured through a user interface for configuring the time conversion object, and the conversion time is calculated based on the system time, the target time, and the time acceleration factor. The specific implementation of the user interface can be found in the description of the relevant content in the following embodiments.

[0084] S303: Process the task object according to the task time. In one embodiment, when the obtained task time meets the processing conditions of the task object, subsequent processing can be performed. For example, if the obtained time is September 1st, which meets the conditions for data dumping, then subsequent data dumping processing can be performed. If the processing conditions of the task object are not met, the time query event generated for the task object can be detected again to execute S301 to S303 again.

[0085] It should be noted that the time conversion object is a dynamic link library (DLL), which is a DLL file on the Windows platform and a .so file on the Linux platform. It provides time calculation, modification, reset, and time acceleration functions (e.g., 1 second (in reality) = 1 minute (after acceleration)), daylight saving time / winter time, etc. This DLL can be injected into the address space of a process using a management tool. In one embodiment, the injection process of the time conversion object may include: receiving the DLL and an injection module object for loading the DLL; loading the DLL into the address space of the task object's process through the injection module object to obtain the time conversion object. The management tool communicates with the process to transmit the DLL and the injection module object to the process. The injection module object provides functions for loading and unloading the DLL for a specified process. The loading function loads the DLL into the process's address space, and the unloading function unloads the DLL from the process's address space.

[0086] In one embodiment, the dynamic link library (DLL) is selected from an object set based on the object type of the task object. The object set may include multiple preset DLLs, each with different time conversion rules. Users or testers of the software application can select the type of the task object requiring time conversion within the user interface provided by the aforementioned management tool. The management tool can then automatically select the appropriate DLL for the task object based on the user-defined type. Different object types correspond to different conversion rules. Object types may include, for example, timed types, periodic types, etc. Timed types can select rules to convert system time to a specified time, while periodic types can select rules to accelerate system time calculations using a time acceleration factor.

[0087] In one embodiment, the dynamic link library includes: a hook function object built based on hook technology and a time function object for converting the base time according to conversion rules; the hook function object is used to intercept time acquisition requests calling the time acquisition object, and converts the base time according to the conversion rules through the time function object. In this way, the corresponding time conversion object can replace system time acquisition functions and other time acquisition objects, providing the process with the modified and converted time, thereby achieving the function of providing a specified time or accelerating the time for the task object.

[0088] In this embodiment, a specially configured time conversion object loaded based on a dynamic link library automatically provides time modification functionality for task objects after successful injection. This enables reprocessing of time according to the test scenario, such as accelerating time elapsed, specifying, and modifying time, thus facilitating the rapid construction of test scenarios. Using dynamic link library injection to achieve non-intrusive time control over single or multiple task objects not only improves the efficiency of time conversion but also effectively reduces system crashes caused by manual modification of system time. Furthermore, the time conversion object can be handled independently through loading and unloading, allowing for rapid environment recovery. Moreover, the time conversion object is a general-purpose, cross-platform time control program that can provide the functionality to modify the time required by task objects across multiple platforms.

[0089] Please see again Figure 4 This is a schematic diagram illustrating the structure for managing the use or testing of software applications according to an embodiment of this application. Figure 4In this application, the management tool 401 comprises four modules: a user interface module 4011, a remote control module 4012, a dynamic library management module 4013, a test stub module 4014, and an injection proxy module 403. The operating system 402 is used to allocate business processes to run software applications. The management tool 401 and the operating system 402 can run on the same computing device or on different computing devices; this application is not limiting this.

[0090] The user interface module 4011 provides a user interface, including viewing process information of task objects in the operating system, system time, accelerated time information, time acceleration multiplier information, as well as query, modification, and restoration functions for time.

[0091] Remote control module 4012: communicates with operating system 402, transmits the corresponding TestStub module 4014 and injection proxy module 403 to the operating system, and starts injection proxy module 403; at the same time, it can also obtain the process, time information, etc. of existing task objects of the operating system through communication with the operating system.

[0092] Dynamic Library Management Module 4013: Completes the functions of injecting and unloading dynamic link libraries on the operating system.

[0093] Test Stub Module 4014: A dynamic link library that implements rewritten time-related APIs for different platforms. It is a DLL file for Windows and an SO file for Linux. It provides functions for time calculation, modification, reset, time acceleration (e.g., 1 second (in reality) = 1 minute (after acceleration)) and daylight saving time / winter time simulation.

[0094] Injection Proxy Module 403: Provides the ability to load and unload dynamic link libraries for a specified process.

[0095] exist Figure 4 Based on this, please refer to Figure 5 This is a flowchart illustrating another time information processing method according to an embodiment of this application. The method described in this application is executed using a management tool running on a computing device. The method specifically includes the following steps.

[0096] S501: Obtain the dynamic link library and the injection module object used to load the dynamic link library;

[0097] S502: Send an injection request to the operating system used to run the task object. The injection request is used to trigger the operating system to execute the injection module object. The injection module object loads the dynamic link library into the address space of the task object's process to obtain a time conversion object. The time conversion object is used to convert the base time according to the conversion rules to obtain the converted time.

[0098] In one embodiment, the method may further include: loading a dynamic link library and an injection module object for loading the dynamic link library into the operating system, so that the dynamic link library is loaded into the address space of the task object's process after the injection request is initiated; and generating an uninstallation request when an uninstallation event of the loaded dynamic link library is detected, the uninstallation request being used to trigger the operating system to execute the injection module object, thereby uninstalling the dynamic link library from the address space of the task object's process through the injection module object. In this technical solution, the dynamic link library and the injection module object can be transferred to the operating system through the injection module object, so that the dynamic link library can be loaded or unloaded through the injection module object without modifying the code of the software application corresponding to the task object. This achieves functions such as injection and uninstallation of time-modification function objects without intrusion.

[0099] In one embodiment, the dynamic link library includes: a hook function object built based on hook technology and a time function object for converting the base time according to conversion rules; the hook function object is used to intercept time acquisition requests that call the time acquisition object, and convert the base time according to conversion rules through the time function object.

[0100] In one embodiment, the method may further include: displaying a user interface; the user interface includes any one or more of the following: a display item for displaying process information of the task object, a configuration item for configuring a specified time for the time conversion object, and a configuration item for configuring a time acceleration factor for the time conversion object, wherein the conversion time is calculated based on the system time, the target time, and the time acceleration factor.

[0101] In one embodiment, please refer to Figure 6 This is a schematic diagram of a user interface according to an embodiment of this application. The user interface can display different information according to the needs of software application use or testing. This information includes, for example, the process information of the task object in the operating system mentioned above, the system time, the accelerated time information, and the time acceleration multiplier information. The user interface can also provide time query, modification, and restoration functions.

[0102] exist Figure 6The user interface shown includes a first display area 601, which includes a host IP input field for using or testing the software application, as well as a username and password input field for the user currently logged in and operating the management tool. After the user enters the correct username and password, they can perform operations such as process monitoring, dynamic link library injection, and uninstallation on the host with the IP address entered in the host IP input field.

[0103] The user interface also includes a second display area 602, which displays a process list. This process list records information about one or more processes currently allocated and running on the host corresponding to the IP address entered in the host IP input field. This information includes process ID, process name, control status, original time, conversion time, and multiplier. The control status field indicates whether the relevant process has executed a time control policy. If a valid value, such as 1, is displayed, it indicates that the relevant process has injected a dynamic link library or a time conversion object, requiring time modification and conversion through the time conversion object. If an invalid value, such as 0, is displayed, it indicates that the relevant process obtains a reference time as the task time by calling the aforementioned time acquisition object.

[0104] The original time field displays the current system time or the obtained base time, while the converted time field records the converted time. This converted time is obtained after the relevant process is injected with a time conversion object, which converts the system time or base time. For example, if the original time field displays "16:15", the converted time field can display the specified time "17:00", or the time T after acceleration using the formula T = TA + (TB - TA) × K. The final multiplier field displays the time acceleration multiplier, i.e., the value of K in the formula T = TA + (TB - TA) × K.

[0105] If a process has not yet injected a time conversion object, that is, has not yet injected any of the dynamic link libraries shown in the dynamic library list, the control status item, conversion time item, and multiplier item may not display any information or may display some specified information to indicate meaninglessness, such as NULL.

[0106] The user interface also includes a third display area 603, which displays a list of dynamic libraries (DLLs). This list records one or more DLLs from the object collection. The DLL list can store information about DLLs of different object types for the user to select from, such as information about timed DLLs and periodic DLLs. The third display area 603 also displays two controls: an "Add" control and a "Delete" control, allowing users to add and delete available DLLs displayed in the DLL list.

[0107] The displayed list shows information about dynamic link libraries (DLLs), including the DLL's name, controlling process ID, and DLL status. The DLL's name can be based on its object type, allowing users to intuitively select injectable DLLs for their target process. The controlling process ID is the ID of the process to which the target DLL is currently injected and controlled, such as the target process ID. If the target DLL is not currently injected into any process, the controlling process ID field will not display any information or will display meaningless information, such as NULL. The DLL's status indicates whether it is available. Users can enable / disable the injected DLL using an on / off button. In one embodiment, a notification message can be sent to the target process to instruct it to call or not call the injected DLL, or to notify the aforementioned injection proxy module to unload the injected DLL. Users can then... Figure 6 The system controls control 606. When control 606 is active, it sends a first notification message to the target process selected in the process list. This first notification message instructs the target process to obtain the conversion time as the task time through the injected dynamic link library. This can also be considered as informing the target process that the time control strategy for the current task object is the second strategy. If control 606 is closed, it sends a second notification message to the target process selected in the process list. This second notification message instructs the target process to obtain a reference time as the feed task time through a time acquisition object (or the system's time acquisition function). This can also be considered as informing the target process that the time control strategy for the current task object is the first strategy. If the target process selected in the process list has not been injected with any dynamic link library, control 606 is in an uneditable state, for example, its color is grayed out and it does not respond to any operations.

[0108] like Figure 6As shown, the user interface also includes "injection" and "unload" controls. Users can select a process with a specific process ID as the target process in the second display area 602 of the user interface, and a dynamic link library (DLL) with a specific name as the target DLL in the third display area 603. If an injection operation is detected, the selected DLL will be injected into the selected target process. The injection process involves communicating with the operating system of the target process, sending the target DLL and the injection module object used to load the target DLL to the target process under the operating system. The target process then triggers the injection module object to load the target DLL into its address space. After the injection is complete, if the user wishes to unload the target DLL from the target process, they can click the "unload" control to delete the target DLL from the target process's address space. Simultaneously, the relevant information in the process list and DLL list will be updated.

[0109] In addition, for dynamically linked libraries (DLLs) that have already been generated or injected into a process, users can control the specified time or time acceleration factor in the DLL by setting the acceleration factor and custom time displayed in the user interface. The specified time can be obtained by editing the time setting in custom time item 605. Furthermore, by editing acceleration factor item 604 and custom time item 605, the values ​​of K (acceleration factor) and TB (custom time) in T = TA + (TB - TA) × K can be modified.

[0110] The Log 607 section of the user interface displays the work logs of the monitored process. Based on the target process's work logs, the working status of relevant task objects in the corresponding software application can be clearly understood. This is especially helpful when the task object is a test object, allowing test users to easily understand the test results of the test object when dynamic link libraries are injected.

[0111] In one embodiment, in Figure 6 The user interface also allows users to specify the type of dynamic link library (DLL) to be injected into the target process currently selected in the process list. For example, the display area occupied by the acceleration factor (604), custom timing (605), and control (606) can be planned. A new object type selection option can be set after control (606), where the user can specify the object type (timer type, periodic type, etc.) of the DLL required by the target process in the current process list. This will automatically select the appropriate DLL object type and inject it into the target process's address space.

[0112] The following is combined with Figure 6A brief description of some injection operations related to this application is provided below:

[0113] 1. The user selects a process as the target process from the process list via touch or other means, and selects a dynamic link library as the target dynamic link library from the dynamic library list. After clicking the "Inject" control, the management tool can execute the steps S501 and S502 above and inject the target dynamic link library into the target process through the injection module object.

[0114] 2. Users select a process as the target process from the process list via touch or other means. If the target dynamic link library has already been injected into the target process, the "Uninstall" control will show that it is in a controllable state. If the user clicks the "Uninstall" control, the injected module object will be triggered to uninstall and delete the target dynamic link library from the target process.

[0115] 3. Users select a process as the target process from the process list via touch or other means, and select a dynamic link library as the target dynamic link library from the dynamic library list. Simultaneously, after editing the specified time and / or time acceleration multiplier in the acceleration multiplier and / or custom time items, the target dynamic link library can be modified according to the edited specified time and / or acceleration multiplier, and the modified target dynamic link library can be injected into the target process.

[0116] 4. Users can select a process as the target process from the process list by touch or other means. If the target dynamic link library has been injected into the target process, the open / close control will be displayed as controllable. Users can send notification messages to the target process by operating the open / close control, so that the time control strategy of the task object on the target process is either the first strategy (open / close control is in the closed position) or the second strategy (open / close control is in the open position).

[0117] 5. The user selects a process as the target process from the process list via touch or other means. If the user selects the desired object type in the object type selection option on the user interface, the dynamic library list will display dynamic link libraries that match the selected object type. The user then decides whether to inject them into the target process. For dynamic link libraries that match the user's selected object type, the corresponding time parameters of the matching dynamic link library can also be displayed in the acceleration multiplier and / or custom time items. The user can decide whether to select the matching dynamic link library based on the content displayed in one or both of these items. Alternatively, the user can set a new specified time value or time acceleration multiplier in one or both of these items to adjust the relevant parameters in the matching dynamic link library before finally injecting it into the selected target process.

[0118] In this embodiment, a special management tool can be used to monitor a task object in the currently used or tested software application. This tool can not only intuitively display the relevant process information of the process in which the task object is located to the user, but also edit, configure and modify the time conversion object used to provide time conversion function for the task object. This greatly satisfies the needs of users who need to monitor software applications and have time modification requirements for intelligent and automated monitoring and time modification, and improves the efficiency of monitoring and time modification.

[0119] Please see again Figure 7 This is a schematic diagram of a time information processing device according to an embodiment of this application. The device described in this embodiment can be installed in a computing device to implement the operation of task objects of software applications and time-related processing. The device includes a communication unit 702 and a processing unit 701. The communication unit 702 is used to communicate with other devices of the computing device or other devices connected to the computing device when needed. The processing unit 701 implements the relevant functional steps of time information processing in this embodiment of the application. The specific functional steps implemented are as follows.

[0120] The processing unit 701 is configured to generate a time acquisition request in response to a time query event generated for a task object, and send the time acquisition request in the operating system running the task object.

[0121] Receive the response time to obtain the task time returned by the request;

[0122] The task object is processed according to the task time;

[0123] Wherein, if a time conversion object is enabled in the operating system, the task time includes: the conversion time obtained through the time conversion object injected in the operating system; the conversion time is obtained by converting the reference time according to the conversion rules; if a time conversion object is not enabled in the operating system, the task time includes: the reference time obtained through the time acquisition object; the reference time is different from the conversion time.

[0124] In one embodiment, if a time conversion object is injected into the operating system, the processing unit 701 intercepts a time acquisition request for calling the time acquisition object through the time conversion object, and obtains the conversion time through the time conversion object; wherein, the time acquisition object is used to obtain a base time as a reference time.

[0125] In one embodiment, the processing unit 701, during the process of sending the time acquisition request in the operating system running the task object, determines the time control strategy of the task object corresponding to the time query event; if it is a first strategy, then in the operating system running the task object, a time acquisition request is sent to a time acquisition object to obtain a reference time; if it is a second strategy, then in the operating system running the task object, a time acquisition request is sent to a time conversion object injected in the operating system to obtain a conversion time.

[0126] In one embodiment, the base time is determined based on the system time of the operating system running the task object, and the conversion time includes any one of the following times:

[0127] The specified time is obtained by converting the system time of the operating system, wherein the conversion rule refers to the rule for converting the system time into the specified time;

[0128] The acceleration time is obtained by performing time acceleration calculations on the system time of the operating system. The conversion rule refers to the rule for conversion calculations based on the time acceleration factor.

[0129] In one embodiment, the specified time is configured through a user interface for configuring the time conversion object; or, the time acceleration factor is configured through a user interface for configuring the time conversion object, and the conversion time is calculated based on the system time, the target time, and the time acceleration factor.

[0130] In one embodiment, the processing unit 701 is further configured to receive a dynamic link library and an injection module object for loading the dynamic link library; and load the dynamic link library into the address space of the process of the task object through the injection module object to obtain the time conversion object.

[0131] In one embodiment, the dynamic link library is selected from an object set based on the object type of the task object. The object set includes multiple dynamic link libraries, and the time conversion rules for different dynamic link libraries are different.

[0132] In one embodiment, the dynamic link library includes: a hook function object built based on hook technology and a time function object for converting the base time according to conversion rules; the hook function object is used to intercept time acquisition requests that call the time acquisition object, and convert the base time according to conversion rules through the time function object.

[0133] In one embodiment, before processing the task object according to the task time, the processing unit 701 is further configured to determine whether the task time meets the processing conditions of the task object; if yes, then the step of processing the task object according to the task time is executed; if no, then a time query event generated for the task object is detected so as to execute the step of generating a time acquisition request in response to the time query event generated for the task object.

[0134] The apparatus described in this application corresponds to the embodiments of the various methods mentioned in the foregoing embodiments. The functional steps implemented by the processing unit 701 in the apparatus and other described contents can be specifically referred to the description of the relevant contents in the foregoing embodiments. The beneficial effects that the apparatus can bring can also be referred to the description of the foregoing embodiments, and will not be repeated here.

[0135] Please see again Figure 8 This is a schematic diagram of another time information processing device according to an embodiment of this application. The device described in this embodiment can be installed in a computing device to implement time-related processing for software applications. The device includes a display unit 802 and a processing unit 801. The display unit 802 is used to display the required information to the user, and the processing unit 801 implements the relevant functional steps of time information processing in this embodiment of the application. The specific functional steps implemented are as follows.

[0136] The processing unit 801 is used to obtain a dynamic link library and an injection module object for loading the dynamic link library; send an injection request to the operating system for running the task object, the injection request is used to trigger the operating system to execute the injection module object, and load the dynamic link library into the address space of the process of the task object through the injection module object to obtain a time conversion object; the time conversion object is used to convert the base time according to the conversion rules to obtain the converted time.

[0137] In one embodiment, the processing unit 801 is further configured to load the dynamic link library and the injection module object for loading the dynamic link library into the operating system, so that the dynamic link library is loaded into the address space of the process of the task object after the injection request is initiated; when an unloading event of the loaded dynamic link library is detected, an unloading request is generated, the unloading request is used to trigger the operating system to execute the injection module object, and unload the dynamic link library from the address space of the process of the task object through the injection module object.

[0138] In one embodiment, the display unit 802 is used to display a user interface; the user interface includes any one or more of the following: a display item for displaying process information of the task object, a configuration item for configuring a specified time for the time conversion object, and a configuration item for configuring a time acceleration factor for the time conversion object, wherein the conversion time is calculated based on the system time, the target time, and the time acceleration factor.

[0139] The apparatus described in this application corresponds to the embodiments of the various methods mentioned in the foregoing embodiments. The functional steps implemented by the processing unit 801 in the apparatus and other described contents can be specifically referred to the description of the relevant contents in the foregoing embodiments. The beneficial effects that the apparatus can bring can also be referred to the description of the foregoing embodiments, and will not be repeated here.

[0140] It should be noted that, Figure 7 and Figure 8 The time information processing device can be the same device, and the processing unit 801 and the processing unit 701 can be the same processing unit performing the corresponding functional steps.

[0141] Please see again Figure 9 This is a schematic diagram of the structure of a computing device according to an embodiment of this application. The computing device 90 of this embodiment includes a processor 901.

[0142] The processor 901 may have storage capabilities, capable of storing necessary computer programs and data. Optionally, a separate memory 902 may also be provided in the computing device 90. The processor 901 may have data transmission and reception capabilities, enabling communication with other devices. Optionally, a separate data communication unit, such as a transceiver 903, may also be provided in the computing device for transmitting and receiving data. The processor 901, memory 902, and transceiver 903 can be connected via a bus, which may be divided into an address bus, a data bus, a control bus, etc. For ease of illustration, Figure 9 The bus is represented by a single thick line, but this does not mean that there is only one bus or one type of bus.

[0143] The memory 902 stores a computer program, and the processor 901 calls the computer program to implement the methods described in some or all of the above embodiments.

[0144] In one embodiment, the processor 901 executes a computer program stored in the memory 902, configured to generate a time acquisition request in response to a time query event generated for a task object, and send the time acquisition request in the operating system running the task object; receive a task time returned in response to the time acquisition request; and process the task object according to the task time; wherein, if a time conversion object is enabled in the operating system, the task time includes: a conversion time obtained through a time conversion object injected in the operating system; the conversion time is obtained by converting a reference time according to a conversion rule; if a time conversion object is not enabled in the operating system, the task time includes: a reference time obtained through a time acquisition object; the reference time is different from the conversion time.

[0145] In one embodiment, if a time conversion object is injected into the operating system, the processor 901 intercepts a time acquisition request for calling the time acquisition object through the time conversion object, and obtains the conversion time through the time conversion object; wherein, the time acquisition object is used to obtain a base time as a reference time.

[0146] In one embodiment, during the process of sending the time acquisition request in the operating system running the task object, the processor 901 is used to determine the time control strategy of the task object corresponding to the time query event; if it is a first strategy, then in the operating system running the task object, a time acquisition request is sent to a time acquisition object to obtain a reference time; if it is a second strategy, then in the operating system running the task object, a time acquisition request is sent to a time conversion object injected in the operating system to obtain a conversion time.

[0147] In one embodiment, the base time is determined based on the system time of the operating system running the task object, and the conversion time includes any one of the following times:

[0148] The specified time is obtained by converting the system time of the operating system, wherein the conversion rule refers to the rule for converting the system time into the specified time;

[0149] The acceleration time is obtained by performing time acceleration calculations on the system time of the operating system. The conversion rule refers to the rule for conversion calculations based on the time acceleration factor.

[0150] In one embodiment, the specified time is configured through a user interface for configuring the time conversion object; or, the time acceleration factor is configured through a user interface for configuring the time conversion object, and the conversion time is calculated based on the system time, the target time, and the time acceleration factor.

[0151] In one embodiment, the processor 901 is further configured to receive a dynamic link library and an injection module object for loading the dynamic link library; and load the dynamic link library into the address space of the process of the task object through the injection module object to obtain the time conversion object.

[0152] In one embodiment, the dynamic link library is selected from an object set based on the object type of the task object. The object set includes multiple dynamic link libraries, and the time conversion rules for different dynamic link libraries are different.

[0153] In one embodiment, the dynamic link library includes: a hook function object built based on hook technology and a time function object for converting the base time according to conversion rules; the hook function object is used to intercept time acquisition requests that call the time acquisition object, and convert the base time according to conversion rules through the time function object.

[0154] In one embodiment, before processing the task object according to the task time, the processor 901 is further configured to determine whether the task time meets the processing conditions of the task object; if yes, then the step of processing the task object according to the task time is executed; if no, then a time query event generated for the task object is detected so as to execute the step of generating a time acquisition request in response to the time query event generated for the task object.

[0155] In one embodiment, in addition to implementing the aforementioned time information processing functions, the computing device, through the processor 901, can also implement functions such as loading and managing time conversion objects (i.e., dynamic link libraries) and process management. Of course, these functions can also be implemented by processors on other computing devices. Specifically, the processor 901 can also be a processing unit used to obtain dynamic link libraries and injection module objects for loading the dynamic link libraries; send an injection request to the operating system used to run the task object, the injection request being used to trigger the operating system to execute the injection module object, and load the dynamic link library into the address space of the task object's process through the injection module object to obtain a time conversion object; the time conversion object is used to convert the base time according to conversion rules to obtain the converted time.

[0156] In one embodiment, the processor 901 is further configured to load a dynamic link library and an injection module object for loading the dynamic link library into the operating system, so that the dynamic link library is loaded into the address space of the process of the task object after the injection request is initiated; when an unloading event of the loaded dynamic link library is detected, an unloading request is generated, the unloading request being used to trigger the operating system to execute the injection module object, and unload the dynamic link library from the address space of the process of the task object through the injection module object.

[0157] The processor 901 is also used to display a user interface; the user interface includes any one or more of the following: a display item for displaying process information of the task object, a configuration item for configuring a specified time for the time conversion object, and a configuration item for configuring a time acceleration multiple for the time conversion object, wherein the conversion time is calculated based on the system time, the target time, and the time acceleration multiple.

[0158] The computing device described in this application corresponds to the embodiments of the various methods mentioned in the foregoing embodiments. The functional steps implemented by the processor and other described contents in the computing device can be specifically referred to the description of the relevant contents in the foregoing embodiments. The beneficial effects that the device can bring can also be referred to the description of the foregoing embodiments, and will not be repeated here.

[0159] Those skilled in the art will also understand that the various illustrative logical blocks and steps listed in the embodiments of this application can be implemented by electronic hardware, computer software, or a combination of both. Whether such functionality is implemented through hardware or software depends on the specific application and the overall system design requirements. Those skilled in the art can implement the described functionality using various methods for each specific application, but such implementation should not be construed as exceeding the scope of protection of the embodiments of this application.

[0160] This application also provides a computer-readable storage medium having a computer program stored thereon, the computer program including program instructions that, when executed by a computer, implement the functions of any of the above method embodiments.

[0161] The aforementioned computer-readable storage media include, but are not limited to, flash memory, hard disk, and solid-state drive.

[0162] This application also provides a computer program product that, when executed by a computer, implements the functions of any of the above method embodiments.

[0163] The solutions described in this application can be implemented in various ways. For example, these technologies can be implemented in hardware, software, or a combination of hardware. For hardware implementation, the processing unit for executing these technologies at the relevant device can be implemented in one or more general-purpose processors, digital signal processors (DSPs), digital signal processing devices, application-specific integrated circuits (ASICs), programmable logic devices, field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic, discrete hardware components, or any combination thereof. The general-purpose processor can be a microprocessor; alternatively, it can also be any conventional processor, controller, microcontroller, or state machine. The processor can also be implemented through a combination of computing devices, such as a digital signal processor and a microprocessor, multiple microprocessors, one or more microprocessors combined with a digital signal processor core, or any other similar configuration.

[0164] In the above embodiments, implementation can be achieved entirely or partially through software, hardware, firmware, or any combination thereof. When implemented in software, it can be implemented entirely or partially in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer instructions are loaded and executed on a computer, all or part of the processes or functions described in the embodiments of this application are generated. The apparatus or computing device involved in the embodiments of this application can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices. The computer instructions can be stored in a computer-readable storage medium or transferred from one computer-readable storage medium to another.

[0165] In this application, the use of singular pronouns to denote "one or more" rather than "one and only one," unless otherwise specified. In this application, unless otherwise specified, "at least one" is intended to mean "one or more," and "more than" is intended to mean "two or more."

[0166] In addition, the term "and / or" in this article is merely a description of the relationship between related objects, indicating that there can be three kinds of relationships. For example, A and / or B can represent three cases: A exists alone, A and B exist simultaneously, and B exists alone. A can be singular or plural, and B can be singular or plural.

[0167] In this application, presets (such as preset sequences) can be understood as definitions, pre-defined, stored, pre-stored, pre-negotiated, pre-configured, solidified, or pre-burned.

[0168] Those skilled in the art will understand that, for the sake of convenience and brevity, the specific working processes of the systems, devices, and units described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here.

[0169] The same or similar parts between the various embodiments in this application can be referred to mutually. In the various embodiments of this application, and in the various implementation methods / methods / implementations within each embodiment, unless otherwise specified or logically conflicting, the terminology and / or descriptions between different embodiments and between the various implementation methods / methods / implementations within each embodiment are consistent and can be mutually referenced. The technical features in different embodiments and the various implementation methods / methods / implementations within each embodiment can be combined according to their inherent logical relationships to form new embodiments, implementation methods, methods, or implementation approaches. The above-described embodiments of this application do not constitute a limitation on the scope of protection of this application.

Claims

1. A time information processing method, characterized in that, Time control applied to single or multiple task objects, including: In response to a time query event generated for a task object, a time acquisition request is generated and sent in the operating system running the task object; Receive the response time to obtain the task time returned by the request; The task object is processed according to the task time; If a time conversion object is enabled in the operating system, the task time includes: a converted time obtained by intercepting a time acquisition request to call a time acquisition object through a time conversion object injected into the operating system; the converted time is obtained by converting a reference time according to conversion rules, and different task object types correspond to different conversion rules, which refer to rules for converting system time to a specified time or rules for conversion calculation according to a time acceleration factor; if a time conversion object is not enabled in the operating system, the task time includes: a reference time obtained through a time acquisition object; the reference time is different from the converted time. The system receives a dynamic link library and an injection module object for loading the dynamic link library; it loads the dynamic link library into the address space of the process of the task object through the injection module object to obtain the time conversion object; the dynamic link library is selected from an object set according to the object type of the task object, and the object set includes multiple dynamic link libraries. Before processing the task object according to the task time, the method further includes: determining whether the task time meets the processing conditions of the task object; if so, executing the step of processing the task object according to the task time; otherwise, detecting a time query event generated for the task object in order to execute the step of generating a time acquisition request in response to the time query event generated for the task object.

2. The method as described in claim 1, characterized in that, The time acquisition object is used to obtain a base time as a reference time.

3. The method as described in claim 1, characterized in that, Sending the time acquisition request in the operating system running the task object includes: Determine the time control strategy for the task object corresponding to the time query event; If the first strategy is adopted, a time acquisition request is sent to the time acquisition object in the operating system running the task object in order to obtain the reference time; If the second strategy is adopted, a time acquisition request is sent to the time conversion object injected in the operating system running the task object in order to obtain the conversion time.

4. The method according to any one of claims 1-3, characterized in that, The base time is determined based on the system time of the operating system running the task object, and the conversion time includes any one of the following times: The specified time obtained after converting the operating system's system time; The acceleration time is obtained by performing time acceleration calculations on the operating system's system time.

5. The method as described in claim 4, characterized in that, The specified time is obtained through a user interface configuration used to configure the time conversion object; Alternatively, the time acceleration factor can be configured through a user interface for configuring the time conversion object, and the conversion time can be calculated based on the system time, the target time, and the time acceleration factor.

6. A time information processing method, characterized in that, Time control applied to single or multiple task objects, including: Obtain the dynamic link library and the injection module object used to load the dynamic link library; An injection request is sent to the operating system used to run the task object. The injection request is used to trigger the operating system to execute the injection module object. The injection module object loads the dynamic link library into the address space of the task object's process to obtain a time conversion object. The dynamic link library is selected from an object set according to the object type of the task object. The object set includes multiple dynamic link libraries. The time conversion object is used to intercept time acquisition requests from the time acquisition object and convert the base time according to the conversion rules to obtain the converted time. Different task object types correspond to different conversion rules. The conversion rules refer to the rules for converting the system time into a specified time or the rules for conversion calculation according to the time acceleration multiple.

7. The method as described in claim 6, characterized in that, The method further includes: The dynamic link library and the injection module object used to load the dynamic link library are loaded into the operating system so that the dynamic link library can be loaded into the address space of the process of the task object after the injection request is initiated. When an unloading event of a loaded dynamic link library is detected, an unloading request is generated. The unloading request is used to trigger the operating system to execute the injected module object, and the injected module object unloads the dynamic link library from the address space of the process of the task object.

8. The method as described in claim 6 or 7, characterized in that, Also includes: Display user interface; The user interface includes one or more of the following: a display item for displaying process information of the task object, a configuration item for configuring a specified time for the time conversion object, and a configuration item for configuring a time acceleration factor for the time conversion object. The conversion time is calculated based on the system time, the target time, and the time acceleration factor.

9. A computing device, characterized in that, The computing device includes a processor for performing the method as described in any one of claims 1-8.

10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a program that, when executed, implements the method as described in any one of claims 1-8.