Certificate time conversion method, device, electronic equipment and medium

The method and device for converting certificate time using a preset algorithm set automate time format conversions, addressing the complexity of existing methods by simplifying business development and improving code security and reusability.

CN112434097BActive Publication Date: 2024-12-20CHINA CONSTRUCTION BANK
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202011380808.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-11-30
Publication Date
2024-12-20
Estimated Expiration
2040-11-30

AI Technical Summary

Technical Problem

Existing time management methods for electronic certificates require explicit calls to various conversion methods, lacking a unified tool that simplifies and secures time format conversions, making business development complex and code maintenance costly.

Method used

A method and device for converting certificate time using a preset time conversion algorithm information set, encapsulating multiple algorithm classes to automate time format conversions, hiding conversion details and improving code reusability and security.

Benefits of technology

Simplifies business development by automating time format conversions, reducing code maintenance costs, and enhancing programming code security and reusability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN112434097B_ABST
    Figure CN112434097B_ABST
Patent Text Reader

Abstract

The embodiment of the present invention discloses a method, device, electronic device and medium for converting certificate time. The method includes: determining first certificate time object data for time format conversion; determining target time conversion algorithm information matching the target time format from a preset time conversion algorithm information set; using the target time conversion algorithm information to convert the first certificate time object data into second certificate time object data having the target time format. By executing this technical solution, the time format conversion details can be hidden to make business development simpler, and the security and reusability of programming code can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present invention relate to the field of data processing, and in particular to a method, device, electronic device and medium for converting certificate time. Background Art

[0002] The time formats in the electronic certificate system are diverse. Different certificates require different time formats. Even in the same certificate data, the time formats of the certificate issuance time, validity period, effective time, establishment date, etc. are different. It is often necessary to convert time data in different formats into a unified format and store them in the database.

[0003] The existing native time management methods require explicit calls to various methods for each processing, so a unified time management tool is needed, which allows business developers to not care about how each conversion is implemented in actual applications, but to give different time formats to the tool, and the tool will return the required data according to different strategies. The various time conversion tools currently on the market cannot fully meet the needs, so a certificate time conversion method that is easy to develop and highly reusable is needed to complete the unified processing of multi-format dates of electronic certificates. Summary of the invention

[0004] The embodiments of the present invention provide a method, device, electronic device and medium for converting certificate time, so as to achieve the technical effect of hiding the time format conversion details, making business development simpler, and improving the security and reusability of programming codes.

[0005] In a first aspect, an embodiment of the present invention provides a method for converting a certificate time, comprising:

[0006] Determine the first certificate time object data for time format conversion;

[0007] Determine the target time conversion algorithm information matching the target time format from the preset time conversion algorithm information set;

[0008] The target time conversion algorithm information is used to convert the first certificate time object data into second certificate time object data having a target time format.

[0009] In a second aspect, an embodiment of the present invention further provides a certificate time conversion device, comprising:

[0010] A data determination module, used to determine the first certificate time object data for time format conversion;

[0011] An algorithm determination module, used to determine target time conversion algorithm information matching the target time format from a preset time conversion algorithm information set;

[0012] The data conversion module is used to convert the first certificate time object data into second certificate time object data having a target time format by using the target time conversion algorithm information.

[0013] In a third aspect, an embodiment of the present invention further provides an electronic device, including:

[0014] one or more processors;

[0015] A storage device for storing one or more programs;

[0016] The one or more programs are executed by the one or more processors, so that the one or more processors implement the certificate time conversion method provided in any embodiment of the present invention.

[0017] In a fourth aspect, an embodiment of the present invention further provides a computer-readable storage medium on which a computer program is stored, and when the program is executed by a processor, a method for converting certificate time as provided in any embodiment of the present invention is implemented.

[0018] A method for converting certificate time is provided in an embodiment of the present invention. First, first certificate time object data to be converted into a time format is determined, target time conversion algorithm information matching the target time format is determined from a preset time conversion algorithm information set, and the determined time conversion algorithm information is used to convert the first certificate time object data into second certificate time object data having the target time format.

[0019] By adopting the technical solution of the present application, the target time conversion algorithm can be determined from the preset time conversion algorithm information set to perform certificate time format conversion, which can achieve the technical effect of hiding the time format conversion details to make business development simpler and improve the security and reusability of programming code.

[0020] The above invention content is only an overview of the technical solution of the present invention. In order to more clearly understand the technical means of the present invention, it can be implemented according to the contents of the specification. In order to make the above and other purposes, features and advantages of the present invention more obvious and easy to understand, the specific implementation methods of the present invention are listed below. BRIEF DESCRIPTION OF THE DRAWINGS

[0021] Other features, objects and advantages of the present invention will become more apparent by reading the detailed description of non-limiting embodiments made with reference to the following drawings. The drawings are only for the purpose of illustrating preferred embodiments and are not to be considered as limiting the present invention. Also, the same reference symbols are used throughout the drawings to represent the same parts. In the drawings:

[0022] Figure 1 This is a flow chart of a method for converting certificate time provided in Example 1 of the present application;

[0023] Figure 2 This is a flow chart of another method for converting certificate time provided in Example 2 of the present application;

[0024] Figure 3 This is a flowchart of another method for converting certificate time provided in Example 3 of the present application;

[0025] Figure 4 It is a structural schematic diagram of the certificate time conversion device provided in the fourth embodiment of the present application;

[0026] Figure 5 It is a structural schematic diagram of an electronic device provided in Example 5 of the present application. DETAILED DESCRIPTION

[0027] The present invention will be further described in detail below in conjunction with the accompanying drawings and embodiments. It is to be understood that the specific embodiments described herein are only used to explain the present invention, rather than to limit the present invention. It should also be noted that, for ease of description, only parts related to the present invention, rather than all structures, are shown in the accompanying drawings.

[0028] It should be mentioned before discussing the exemplary embodiments in more detail that some exemplary embodiments are described as processes or methods depicted as flow charts. Although the flow charts describe the operations (or steps) as sequential processes, many of the operations therein can be implemented in parallel, concurrently or simultaneously. In addition, the order of the operations can be rearranged. The process can be terminated when its operation is completed, but can also have additional steps not included in the accompanying drawings. The process can correspond to a method, function, procedure, subroutine, subprogram, etc.

[0029] Embodiment 1

[0030] Figure 1 This is a flow chart of a certificate time conversion method provided in the first embodiment of the present invention. The method can be applied to the unified processing of multi-format dates of electronic certificates. The method can be executed by a certificate time conversion device, which can be implemented by software and / or hardware and can be integrated into an electronic device. Figure 1 As shown, the certificate time conversion method in this embodiment includes the following steps:

[0031] S110, determining the first certificate time object data to be converted into a time format.

[0032] Among them, the first license time object data can be the time data in the licenses received from different departments and bureaus in the public service system. The time format in the license system is diverse, and different licenses require different time formats. Even in the same license, the time formats of the license issuance time, validity time, effective time, establishment date, date of birth, etc. are also different. Whether it is to store the time data in the license in the database, or to convert the unified time format in the database into the time format required by the license as output, the time format conversion is required. For example, the financial license should display the issuance date as a date in Uyghur, Mongolian, Tibetan and other language formats, the insurance license will display the issuance date as three fields of year, month and day, respectively displayed on the license, the birth medical certificate should display the birth time as six fields of year, month, day, hour, minute and second, respectively displayed on the license, and the issuance date of the heating business license should be displayed in Chinese capital date format, etc.

[0033] When we need to operate a certain time in the Java system, the steps usually required are to first obtain the timestamp of the time, and then pass it as raw data to the Calendar class to generate a Calendar object. Calendar provides time operations for different units. After the operation is completed, the data of the date type is returned, and finally our time is formatted into the format we need as needed. In converting time in different formats into time recognized by the Java system, Data itself provides a variety of methods, such as: when constructing an object of the Date class, you can pass in a long type number, or you can pass in the year, month, day, hour, minute, and second numbers. If you rewrite the operation process every time you need to operate, the cost of maintaining the code will be high and the readability will be poor.

[0034] In an optional scheme of this embodiment, it can be combined with one or more optional schemes of this embodiment. Among them, the time format conversion scenario includes the certificate time object data output scenario and the certificate time object data storage scenario. Among them, the certificate time object data output scenario can be to convert the unified time format in the database into the time format required by each certificate, and the certificate time object data storage scenario can be to convert the different time formats in each certificate into a unified timestamp format and store it in the database.

[0035] S120: Determine target time conversion algorithm information matching the target time format from a preset time conversion algorithm information set.

[0036] Among them, the time conversion algorithm set can be constructed through the strategy pattern in Java programming, and the target time conversion algorithm information matching the target time format is determined in the time conversion algorithm information set. The target time conversion algorithm information can be an algorithm class that can specifically realize the target time format conversion.

[0037] In an optional solution of this embodiment, it can be combined with one or more optional solutions of this embodiment. Among them, the time conversion algorithm information set encapsulates at least two algorithm classes for realizing time format conversion of certificate time object data. Optionally, a time format conversion algorithm class corresponds to a time format conversion mode.

[0038] By adopting the above technical solution, by encapsulating at least two algorithm classes for realizing time format conversion of certificate time object data into a time conversion algorithm information set, the technical effect of eliminating the need to pay attention to various time conversion logics during business development and facilitating code modification and maintenance is achieved.

[0039] S130: Use the target time conversion algorithm information to convert the first certificate time object data into second certificate time object data having a target time format.

[0040] Among them, the target time conversion algorithm is used to convert the first certificate time object data into the second certificate time object data with the target time format. The second certificate time object data can be the time object data specified or recognizable by the public management system or the department information storage system, or it can be a timestamp format that can be judged and recognized by the Java system.

[0041] The technical solution of this embodiment determines the first certificate time object data for time format conversion, then determines the target time conversion algorithm information that matches the target time format from a preset time conversion algorithm information set, and finally uses the target time conversion algorithm information to convert the first certificate time object data into the second certificate time object data having the target time format, thereby achieving the effect of hiding the time format conversion details to make business development simpler and improve the security and reusability of the programming code.

[0042] Embodiment 2

[0043] Figure 2 This is a flow chart of another method for converting the time of a certificate provided in the second embodiment of the present application. The embodiment of the present invention further optimizes the above embodiment on the basis of the above embodiment, and the embodiment of the present invention can be combined with various optional solutions in one or more of the above embodiments. Figure 2 As shown, the certificate time conversion method provided in the embodiment of the present invention may include the following steps:

[0044] S210: In a scenario where the certificate time object data is stored, determine the first certificate time object data to be converted into a time format.

[0045] Among them, the first certificate time object data for time format conversion is determined. The scenario of time format conversion here can be the certificate time object data storage scenario, which can be to convert certificate time object data of different time formats in multiple different electronic certificates into a unified timestamp format and save it in the database.

[0046] In an optional solution of this embodiment, it can be combined with one or more optional solutions of this embodiment. In the scenario where the certificate time object data is stored, determining the first certificate time object data for time format conversion includes: obtaining at least one first certificate time object data with a time format, and converting the first certificate time object data into a corresponding time string; the first certificate time object data from different sources have the same time format or different time formats.

[0047] Among them, at least one first certificate time object data with a time format is obtained, and the first certificate time object data is converted into a corresponding time string; the first certificate time object data from different sources converted here have the same time format or different time formats.

[0048] In an optional scheme of the present embodiment, it can be combined with one or more optional schemes of the present embodiment. Among them, converting the first certificate time object data into a corresponding time string includes: using a preset native class time conversion function to convert the first certificate time object data into a corresponding time string; the native class time conversion function includes a time class and a calendar class operation function provided by Java natively. Among them, using the time class and calendar class operation functions provided by Java natively to convert the first certificate time object data into a time string format that can be recognized by the Java system.

[0049] In an optional solution of this embodiment, it can be combined with one or more optional solutions of this embodiment. After converting the first certificate time object data into a corresponding time string, it also includes: judging whether the time string converted from the first certificate time object data with a time format is legal; if legal, automatically performing the following operations: determining the target time conversion algorithm information matching the target time format from the preset time conversion algorithm information set; if illegal, re-performing the following operations: obtaining at least one first certificate time object data with a time format.

[0050] Among them, judging whether the time string obtained by converting the first certificate time object data with a time format is legal can refer to whether the string conforms to the regular expression, that is, judging whether there is an error in the string format. If there is no error, the target time conversion algorithm information matching the target time format will be determined from the preset time conversion algorithm information set. If there is an error, at least one first certificate time object data with a time format will be re-acquired.

[0051] By adopting the above technical solution, the conversion of the certificate time object data format is realized by flexibly applying the native conversion methods of the time class and calendar class provided by the Java system and cooperating with the customized template class, thereby achieving the technical effect of reducing the cost of maintaining code and improving code readability.

[0052] S220: Store the certificate time object data in a unified timestamp format used by the certificate database in the scenario as the target time format.

[0053] The database may be a local database of the license system in the public management system, and the unified timestamp format may be the total number of seconds from 00:00:00 Greenwich Mean Time, January 1, 1970 (08:00:00 Beijing Time, January 1, 1970) to the present. In layman's terms, a timestamp is a complete and verifiable piece of data that indicates that a piece of data existed at a specific point in time.

[0054] S230: Filter, from a preset time conversion algorithm information set, time conversion algorithm information that matches the current time format of the first license time object data and the target time format as target time conversion algorithm information.

[0055] Among them, the time conversion algorithm information matching the current time format and the target time format of the first license time object data is selected from the preset time conversion algorithm information set, and the target time format may be a timestamp format recognized by the Java system.

[0056] S240: Use the target time conversion algorithm information to convert the first certificate time object data into second certificate time object data having a target time format.

[0057] The technical solution of this embodiment is to determine the first certificate time object data to be converted into a time format in a certificate time object data storage scenario, then use the unified timestamp format used by the certificate database in the certificate time object data storage scenario as the target time format, and select the time conversion algorithm information that matches the current time format and the target time conversion format from a preset time conversion algorithm information set as the target time conversion algorithm information. The selected target time conversion algorithm information is used to realize the conversion of the second certificate time object data, thereby reducing the cost of maintaining the code, improving the readability of the code, making business development simpler, and improving the security and reusability of the programming code.

[0058] Embodiment 3

[0059] Figure 3 This is a flowchart of another method for converting the time of a certificate provided in the third embodiment of the present application. The embodiment of the present invention further optimizes the above embodiment on the basis of the above embodiment, and the embodiment of the present invention can be combined with various optional solutions in one or more of the above embodiments. Figure 3 As shown, the certificate time conversion method provided in the embodiment of the present invention may include the following steps:

[0060] S310: In a certificate time object data output scenario, determine first certificate time object data for time format conversion.

[0061] Among them, the certificate time object data output scenario may be that in the office system, the current or set date and time needs to be output to the certificate to generate the certificate, such as the issuance and issuance of birth certificates, financial licenses, insurance licenses, etc.

[0062] In an optional solution of this embodiment, it can be combined with one or more optional solutions of this embodiment. In the output scenario of the certificate time object data, determining the first certificate time object data to be converted into a time format includes: obtaining at least one first certificate time object data having a unified timestamp format used by the certificate database, and converting the first certificate time object data into a corresponding time string.

[0063] In an optional solution of this embodiment, it can be combined with one or more optional solutions of this embodiment. Among them, converting the first certificate time object data into a corresponding time string includes: using a preset native class time conversion function to convert the first certificate time object data with a unified timestamp format into a corresponding time string; the native class time conversion function includes a time class and a calendar class operation function provided by Java native.

[0064] In an optional solution of this embodiment, it can be combined with one or more optional solutions of this embodiment. Among them, after converting the first certificate time object data into a corresponding time string, it also includes: judging whether the time string converted from the first certificate time object data in a unified timestamp format is legal; if it is legal, automatically performing the following operations: determining the target time conversion algorithm information that matches the target time format from a preset time conversion algorithm information set; if it is illegal, re-performing the following operations: obtaining at least one first certificate time object data in a unified timestamp format used by the certificate database.

[0065] By adopting the above technical solution, the conversion of the certificate time object data format is realized by flexibly applying the native conversion methods of the time class and calendar class provided by the Java system and cooperating with the customized template class, thereby achieving the technical effect of reducing the cost of maintaining code and improving code readability.

[0066] S320. The time format required by the certificate system in the certificate time object data output scenario is used as the target time format; the certificate time object data output scenario includes a certificate generation scenario and a certificate display scenario.

[0067] Among them, the certificate generation scenario can be a certificate generated according to the current time when the official electronic certificate is issued, such as a birth certificate, etc. The certificate display scenario can be that multiple or multiple certificates need to be displayed at the same time, and the same system time is displayed on different certificates.

[0068] S330: Filter the time conversion algorithm information that matches the current time format of the first license time object data and the target time format from the preset time conversion algorithm information set as the target time conversion algorithm information.

[0069] S340: using the target time conversion algorithm information, converting the first license time object data into a second license time object data having a target time format;

[0070] The technical solution of this embodiment, by determining the first certificate time object data to be converted into a time format in the certificate time object data output scenario, taking the time format required in the scenario as the target time format, screening the time algorithm information matching the target time format from a preset time conversion algorithm set as the target algorithm information, and performing time conversion to obtain the second certificate time object data, achieves the effect of reducing the cost of maintaining code, improving code readability, making business development simpler, and improving the security and reusability of programming code.

[0071] Embodiment 4

[0072] Figure 4: is a schematic diagram of the structure of a certificate time conversion device provided in the fourth embodiment of the present invention. The device can be applied to the situation of unified processing of multi-format dates of electronic certificates. The device can be implemented by software and / or hardware and integrated in electronic equipment. The device is used to implement the certificate time conversion method provided in the above embodiment. Figure 4 As shown, the certificate time conversion device provided in this embodiment includes:

[0073] The data determination module 410 is used to determine the first certificate time object data for time format conversion;

[0074] The algorithm determination module 420 is used to determine the target time conversion algorithm information matching the target time format from the preset time conversion algorithm information set;

[0075] The data conversion module 430 is used to convert the first certificate time object data into second certificate time object data having a target time format by using the target time conversion algorithm information.

[0076] Based on the above embodiment, optionally, the algorithm determination module 420 is used to:

[0077] The time conversion algorithm information set encapsulates at least two algorithm classes for implementing time format conversion of certificate time object data.

[0078] Based on the above embodiment, optionally, the algorithm determination module 420 is further used to:

[0079] A time format conversion algorithm class corresponds to a time format conversion mode.

[0080] Based on the above embodiment, optionally, the data determination module 410 is used to:

[0081] The time format conversion scenarios include the certificate time object data output scenario and the certificate time object data storage scenario.

[0082] Based on the above embodiment, optionally, the data determination module 410 is further configured to:

[0083] In the scenario where the certificate time object data is stored, determining the first certificate time object data to be converted into a time format includes:

[0084] At least one first certificate time object data having a time format is obtained, and the first certificate time object data is converted into a corresponding time string; the first certificate time object data from different sources have the same time format or different time formats.

[0085] Based on the above embodiment, optionally, the data determination module 410 is further configured to:

[0086] Converting the first certificate time object data into a corresponding time string includes:

[0087] Use the preset native class time conversion function to convert the first certificate time object data into a corresponding time string; the primitive class time conversion function includes the time class and calendar class operation functions provided by Java natively.

[0088] Based on the above embodiment, optionally, the algorithm determination module 420 is used to:

[0089] Determine whether the time character string obtained by converting the first license time object data having a time format is legal;

[0090] If it is legal, the following operations are automatically performed: determining the target time conversion algorithm information matching the target time format from the preset time conversion algorithm information set;

[0091] If it is illegal, the following operations are performed again: obtaining at least one first certificate time object data having a time format.

[0092] Based on the above embodiment, optionally, the algorithm determination module 420 is further used to:

[0093] Determine the target time conversion algorithm information matching the target time format from the preset time conversion algorithm information set, including:

[0094] Storing the certificate time object data in a unified timestamp format used by the certificate database in the scenario as the target time format;

[0095] From the preset time conversion algorithm information set, the time conversion algorithm information matching the current time format of the first license time object data and the target time format is selected as the target time conversion algorithm information.

[0096] Based on the above embodiment, optionally, the data determination module 410 is further configured to:

[0097] In the certificate time object data output scenario, determining the first certificate time object data to be converted into a time format includes:

[0098] At least one first credential time object data in a unified timestamp format used by a credential database is obtained, and the first credential time object data is converted into a corresponding time character string.

[0099] Based on the above embodiment, optionally, the data determination module 410 is further configured to:

[0100] Converting the first certificate time object data into a corresponding time string includes:

[0101] The preset native class time conversion function is used to convert the first certificate time object data having a unified timestamp format into a corresponding time string; the primitive class time conversion function includes the time class and calendar class operation functions provided by Java natively.

[0102] Based on the above embodiment, optionally, the algorithm determination module 420 is further used to:

[0103] Determine the target time conversion algorithm information matching the target time format from the preset time conversion algorithm information set, including:

[0104] The time format required by the certificate system in the certificate time object data output scenario is used as the target time format; the certificate time object data output scenario includes the certificate generation scenario and the certificate display scenario;

[0105] From the preset time conversion algorithm information set, the time conversion algorithm information matching the current time format of the first license time object data and the target time format is selected as the target time conversion algorithm information.

[0106] Based on the above embodiment, optionally, the algorithm determination module 420 is further used to:

[0107] After converting the first license time object data into a corresponding time character string, the method further includes:

[0108] Determine whether the time character string obtained by converting the first license time object data in the unified timestamp format is legal;

[0109] If it is legal, the following operations are automatically performed: determining the target time conversion algorithm information matching the target time format from the preset time conversion algorithm information set;

[0110] If it is illegal, the following operations are performed again: obtaining at least one first certificate time object data having a unified timestamp format used by the certificate database.

[0111] Embodiment 5

[0112] Figure 5 Schematic diagram of the structure of an electronic device provided in Embodiment 5 of the present application. The present application embodiment provides an electronic device, in which the certificate time conversion device provided in the present application embodiment can be integrated. Figure 5As shown, this embodiment provides an electronic device 500, which includes: one or more processors 520; a storage device 510, which is used to store one or more programs. When the one or more programs are executed by the one or more processors 520, the one or more processors 520 implement the certificate time conversion method provided in the embodiment of the present application, and the method includes:

[0113] Determine the first certificate time object data for time format conversion;

[0114] Determine the target time conversion algorithm information matching the target time format from the preset time conversion algorithm information set;

[0115] The target time conversion algorithm information is used to convert the first certificate time object data into second certificate time object data having a target time format.

[0116] Of course, those skilled in the art can understand that the processor 520 also implements the technical solution of the certificate time conversion method provided in any embodiment of the present application.

[0117] Figure 5 The electronic device 500 shown is merely an example and should not bring any limitation to the functions and scope of use of the embodiments of the present application.

[0118] like Figure 5 As shown, the electronic device 500 includes a processor 520, a storage device 510, an input device 530, and an output device 540; the number of the processor 520 in the electronic device can be one or more. Figure 5 A processor 520 is taken as an example; the processor 520, the storage device 510, the input device 530 and the output device 540 in the electronic device can be connected via a bus or other means. Figure 5 The connection via bus 550 is taken as an example.

[0119] The storage device 510, as a computer-readable storage medium, can be used to store software programs, computer executable programs and module units, such as program instructions corresponding to the certificate time conversion method in the embodiment of the present application.

[0120] The storage device 510 may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system and at least one application required for a function; the data storage area may store data created according to the use of the terminal, etc. In addition, the storage device 510 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, or other non-volatile solid-state storage device. In some instances, the storage device 510 may further include a memory remotely arranged relative to the processor 520, and these remote memories may be connected via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0121] The input device 530 may be used to receive input numbers, character information or voice information, and generate key signal input related to user settings and function control of the electronic device. The output device 540 may include electronic devices such as a display screen and a speaker.

[0122] The electronic device provided in the embodiment of the present application can achieve the technical effect of hiding the details of time format conversion to make business development simpler and improve the security and reusability of programming codes.

[0123] Embodiment 6

[0124] A sixth embodiment of the present invention provides a computer-readable medium on which a computer program is stored. When the program is executed by a processor, the method for converting a certificate time is executed. The method includes:

[0125] Determine the first certificate time object data for time format conversion;

[0126] Determine the target time conversion algorithm information matching the target time format from the preset time conversion algorithm information set;

[0127] The target time conversion algorithm information is used to convert the first certificate time object data into second certificate time object data having a target time format.

[0128] Optionally, when the program is executed by a processor, it can also be used to execute the certificate time conversion method provided in any embodiment of the present invention.

[0129] The computer storage medium of the embodiment of the present invention may adopt any combination of one or more computer-readable media. The computer-readable medium may be a computer-readable signal medium or a computer-readable storage medium. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples (non-exhaustive list) of computer-readable storage media include: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM), a flash memory, an optical fiber, a portable CD-ROM, an optical storage device, a magnetic storage device, or any suitable combination of the above. The computer-readable storage medium may be any tangible medium containing or storing a program, which may be used by or in combination with an instruction execution system, device or device.

[0130] Computer-readable signal media may include data signals propagated in baseband or as part of a carrier wave, which carry computer-readable program code. Such propagated data signals may take a variety of forms, including but not limited to: electromagnetic signals, optical signals, or any suitable combination of the above. Computer-readable signal media may also be any computer-readable medium other than a computer-readable storage medium, which may send, propagate, or transmit a program for use by or in conjunction with an instruction execution system, apparatus, or device.

[0131] The program code contained on the computer-readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wire, optical cable, radio frequency (RF), etc., or any suitable combination of the above.

[0132] Computer program code for performing the operations of the present invention may be written in one or more programming languages ​​or a combination thereof, including object-oriented programming languages, such as Java, Smalltalk, C++, and conventional procedural programming languages, such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., via the Internet using an Internet service provider).

[0133] In the description of this specification, the description with reference to the terms "one embodiment", "some embodiments", "examples", "specific examples", or "some examples" means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present invention. In this specification, the schematic representation of the above terms does not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described may be combined in any one or more embodiments or examples in a suitable manner.

[0134] Note that the above are only preferred embodiments of the present invention and the technical principles used. Those skilled in the art will understand that the present invention is not limited to the specific embodiments described herein, and that various obvious changes, readjustments and substitutions can be made by those skilled in the art without departing from the scope of protection of the present invention. Therefore, although the present invention has been described in more detail through the above embodiments, the present invention is not limited to the above embodiments, and may include more other equivalent embodiments without departing from the concept of the present invention, and the scope of the present invention is determined by the scope of the appended claims.

Claims

1. A method for converting certificate time, characterized in that: The method comprises: Determine the first certificate time object data for time format conversion; wherein the first certificate time object data is the time data in the certificates received from different departments and bureaus in the public service system; Determine the target time conversion algorithm information matching the target time format from the preset time conversion algorithm information set; the time conversion algorithm information set encapsulates at least two algorithm classes for realizing time format conversion of the license time object data, and one time format conversion algorithm class corresponds to one time format conversion mode; Using the target time conversion algorithm information, converting the first license time object data into second license time object data having a target time format; The time format conversion scenario includes a certificate time object data output scenario and a certificate time object data storage scenario; wherein, the certificate time object data output scenario is to convert the unified time format in the database into the time format required by each certificate, and the certificate time object data storage scenario is to convert the different time formats in each certificate into a unified timestamp format and store it in the database; In the scenario where the certificate time object data is stored, determining the first certificate time object data to be converted into a time format includes: Acquire at least one first certificate time object data having a time format, and convert the first certificate time object data into a corresponding time string; the first certificate time object data from different sources have the same time format or different time formats; The converting the first certificate time object data into a corresponding time character string includes: Using a preset native class time conversion function, convert the first certificate time object data into a corresponding time string; the native class time conversion function includes a time class and a calendar class operation function provided by Java natively; The step of determining target time conversion algorithm information matching the target time format from a preset time conversion algorithm information set includes: Storing the certificate time object data in a unified timestamp format used by the certificate database in the scenario as the target time format; From the preset time conversion algorithm information set, select the time conversion algorithm information that matches the current time format of the first license time object data and the target time format as the target time conversion algorithm information; In the certificate time object data output scenario, determining the first certificate time object data to be converted into a time format includes: Acquire at least one first certificate time object data in a unified timestamp format used by the certificate database, and convert the first certificate time object data into a corresponding time string; The converting the first certificate time object data into a corresponding time character string includes: Using a preset native class time conversion function, converting the first certificate time object data having a unified timestamp format into a corresponding time string; the native class time conversion function includes a time class and a calendar class operation function provided by Java natively; The step of determining target time conversion algorithm information matching the target time format from a preset time conversion algorithm information set includes: The time format required by the certificate system in the certificate time object data output scenario is used as the target time format; the certificate time object data output scenario includes a certificate generation scenario and a certificate display scenario; wherein the certificate generation scenario is a scenario in which a certificate is generated according to the current time when an electronic certificate is issued, and the certificate display scenario is a scenario in which the same system time is displayed on different certificates when multiple or multiple certificates need to be displayed at the same time; From the preset time conversion algorithm information set, the time conversion algorithm information matching the current time format of the first license time object data and the target time format is selected as the target time conversion algorithm information.

2. The method according to claim 1, characterized in that After converting the first license time object data into a corresponding time character string, the method further includes: Determine whether the time character string obtained by converting the first license time object data having a time format is legal; If it is legal, the following operations are automatically performed: determining the target time conversion algorithm information matching the target time format from the preset time conversion algorithm information set; If it is illegal, the following operations are performed again: obtaining at least one first certificate time object data having a time format.

3. The method according to claim 1, characterized in that After converting the first license time object data into a corresponding time character string, the method further includes: Determine whether the time character string obtained by converting the first license time object data in the unified timestamp format is legal; If it is legal, the following operations are automatically performed: determining the target time conversion algorithm information matching the target time format from the preset time conversion algorithm information set; If it is illegal, the following operations are performed again: obtaining at least one first certificate time object data having a unified timestamp format used by the certificate database.

4. A certificate time conversion device, characterized in that: The device comprises: A data determination module, used to determine the first certificate time object data for time format conversion; wherein the first certificate time object data is the time data in the certificates received from different bureaus in the public service system; An algorithm determination module, used to determine target time conversion algorithm information matching the target time format from a preset time conversion algorithm information set; A data conversion module, configured to convert the first certificate time object data into second certificate time object data having a target time format by using the target time conversion algorithm information; The data determination module is specifically used for: the time format conversion scenario includes the certificate time object data output scenario and the certificate time object data storage scenario; wherein, the certificate time object data output scenario is to convert the unified time format in the database into the time format required by each certificate, and the certificate time object data storage scenario is to convert the different time formats in each certificate into a unified timestamp format and store it in the database; The data determination module is further used for: In the scenario where the certificate time object data is stored, determining the first certificate time object data to be converted into a time format includes: Acquire at least one first certificate time object data having a time format, and convert the first certificate time object data into a corresponding time string; first certificate time object data from different sources have the same time format or have different time formats; converting the first certificate time object data into the corresponding time string includes: using a preset native class time conversion function to convert the first certificate time object data into the corresponding time string; the native class time conversion function includes a time class and a calendar class operation function provided by Java natively; In the certificate time object data output scenario, determining the first certificate time object data to be converted into a time format includes: Acquire at least one first license time object data in a unified timestamp format used by a license database, and convert the first license time object data into a corresponding time string; the converting the first license time object data into the corresponding time string includes: using a preset native class time conversion function to convert the first license time object data in a unified timestamp format into a corresponding time string; the native class time conversion function includes a time class and a calendar class operation function provided by Java natively; The algorithm determination module is further used to determine target time conversion algorithm information matching the target time format from a preset time conversion algorithm information set, including: The license time object data is stored in a unified timestamp format used by the license database in the scene as the target time format; from a preset time conversion algorithm information set, the time conversion algorithm information matching the current time format of the first license time object data and the target time format is selected as the target time conversion algorithm information; The time format required by the certificate system in the certificate time object data output scenario is used as the target time format; the certificate time object data output scenario includes a certificate generation scenario and a certificate display scenario; wherein the certificate generation scenario is a scenario in which a certificate is generated according to the current time when an electronic certificate is issued, and the certificate display scenario is a scenario in which the same system time is displayed on different certificates when multiple or multiple certificates need to be displayed at the same time; from a preset time conversion algorithm information set, the time conversion algorithm information that matches the current time format of the first certificate time object data and the target time format is selected as the target time conversion algorithm information; The algorithm determination module is specifically used for: The time conversion algorithm information set encapsulates at least two algorithm classes for realizing time format conversion of license time object data, and one time format conversion algorithm class corresponds to one time format conversion mode.

5. An electronic device, characterized in that: include: one or more processors; A storage device for storing one or more programs; When the one or more programs are executed by the one or more processors, the one or more processors implement the certificate time conversion method described in any one of claims 1-3.

6. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the certificate time conversion method described in any one of claims 1-3 is implemented.