Configuration system capable of realizing human resource master data standard API (Application Program Interface) docking

By providing a configuration system, including account verification, port judgment, timestamp verification, encryption and logging modules, it solves the frequent development problems caused by field differences when the human resources system synchronizes the master data with the external system, and realizes efficient and secure master data connection between the human resources system and third-party systems.

CN119690703APending Publication Date: 2025-03-25YONYOU FINANCIAL INFORMATION TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411780836.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-05
Publication Date
2025-03-25

AI Technical Summary

Technical Problem

In the prior art, when the human resource system synchronizes the master data with the external system, the field differences in each system lead to frequent development and inefficiency.

Method used

It provides a configuration system that can realize the standard API docking of human resources master data, including account verification module, judgment port module, verification time stamp module, encryption module and logging module. Through the configuration of these modules, API docking is realized, simplifying the main data docking of human resources system and third-party systems.

Benefits of technology

Through configuration, users can easily connect to different third-party systems without changing their code, ensuring universality, flexibility and security, improving efficiency and reducing development burden.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119690703A_ABST
    Figure CN119690703A_ABST
Patent Text Reader

Abstract

The invention discloses a configuration system capable of realizing human resource main data standard API (Application Program Interface) docking, which relates to the technical field of human resource system main data interfaces and comprises an account verification module, a judgment port module, a verification timestamp module, an encryption module and a log recording module. The input parameter of the account verification module is provided with an account which is used for the account information of an access interface provided by the HR for the consumer and the query authority of the content associated with the account; according to the input value, corresponding data is inquired in a database, and the corresponding data comprises the account inquiry table, windowing inquiry fields and fields needed by inquiry under different conditions. According to the configuration system, a standard API interface is developed, the interface can be published only by implementing or writing a corresponding view by a developer when connection of newly added main data is involved, so that the system has higher maintainability and expansibility, the development efficiency is improved, the operation is simple and rapid, the interface display is clear, and various personalized requirements are met.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of human resource system master data interface, and in particular to a configuration system capable of realizing human resource master data standard API docking. Background Art

[0002] With the popularization of informatization, the human resources system plays a very important role in the company. More and more external systems synchronize master data (organizational structure, basic personnel information) from the human resources system, but the master data fields synchronized by each system are different, and frequent development leads to low efficiency. Summary of the invention

[0003] In view of the deficiencies of the prior art, the present invention provides a configuration system that can realize standard API docking of human resources master data, thereby solving the problems raised in the above-mentioned background technology.

[0004] To achieve the above objectives, the present invention is implemented through the following technical solutions: a configuration system capable of realizing standard API docking of human resources master data, including an account verification module, a judgment port module, a verification timestamp module, an encryption module and a log recording module;

[0005] Account verification module, as follows:

[0006] The input parameter has a mandatory item account. This value is mandatory and is used for the account information of the access interface provided by HR to consumers and the query authority of the account-related content. According to the input value, the corresponding data is queried in the database. The corresponding data includes the account query table, window query fields, and fields required for query under different conditions.

[0007] If the value is not found, an error is reported or the value does not exist, then the result is returned and recorded in the log table with error code 0003.

[0008] Determine the port module, as follows:

[0009] Used to determine whether the query permissions of the account comply with the system configuration;

[0010] Verify the input parameter method_name, which is a fixed value provided by HR to distinguish the function of the request.

[0011] Verify the timestamp module, as follows:

[0012] If the timestamp verification function is enabled in the configuration, the timestamp takes effect for 10 minutes;

[0013] If the timestamp of this query is not within 10 minutes, the generated sign check fails and the error code 0002 is marked;

[0014] Encryption module, as follows:

[0015] Used to store records in the subtable of the corresponding method. If encryption is required, SM4 is used to implement encryption and perform SM4 encryption operation on the overall return value.

[0016] The log recording module is used to record logs, and the logs are stored in the subtable.

[0017] Optionally, the account verification module uses the incoming MD5, and uses the account, secret key, timestamp, and generated MD5 to compare with the incoming MD5, using the account, sign, and timestamp in the input parameters.

[0018] Optionally, at the initial stage of account registration, the system generates a uuid, and regenerates the sign by converting the account number + uuid + timestamp into md5;

[0019] If the system-generated content is consistent with the content passed by the interface, it means that the used uuid is the same, and this part of the verification passes;

[0020] If the verification fails, md5 is returned; if the verification fails, the error code 0001 is marked.

[0021] Optionally, the process of determining the port module is as follows:

[0022] If the corresponding permissions are configured, this value is then used to distinguish different regional query codes for different required items;

[0023] If the permissions for this query do not cover the other party's input, there is no relevant query permission, and the error code 0004 is marked.

[0024] Optionally, the timestamp verification module queries different interfaces according to different input parameters, wherein the input parameter field is set to timestamp.

[0025] Optionally, the sm4Key of the encryption key in the encryption module is the uuid obtained by account query.

[0026] Optionally, the log records in the log recording module are arranged in reverse chronological order, and the upper limit of the number of displayed records is set to 20.

[0027] The present invention provides a configuration system that can realize the standard API connection of human resources master data, which has the following beneficial effects:

[0028] This configuration system can realize the standard API connection of human resource master data. API connection is realized through configuration. In actual application, human resource system connects with third-party system for human resource master data, and these systems usually have their own independent API interfaces. The basic principle of API connection is to realize data transmission and call through interface specifications, so as to realize the collaborative work between systems. For each new master data interface, the human resource system basically needs to develop an independent interface for the third-party system to call.

[0029] In order to adapt to the master data connection of different external systems, this function adopts a simple, configuration-based method to realize the human master data API connection, which can help users easily connect to different third-party systems through simple configuration without changing the code, while ensuring universality, flexibility and security. Figure 3 shown.

[0030] This configuration system can realize the standard API connection of human resources master data, and can flexibly set interface encryption; human resources data has high privacy requirements, and different interfaces can be encrypted for transmission according to business requirements, such as Figure 4 shown.

[0031] This configuration system can realize the standard API connection of human resources master data, which is convenient for querying interface logs. Since a universal API is used, we have developed a front-end log query page that records all call records. The main response scenario is to record the number of accesses and access time in the early stage of the production environment, and whether the interface reports an error, similar to the scheduled task log. It is very inconvenient to obtain the log in production, such as Figure 5 shown. BRIEF DESCRIPTION OF THE DRAWINGS

[0032] Figure 1 This is an example diagram of the account verification module in the invention;

[0033] Figure 2 This is an example diagram of the log recording module in the invention;

[0034] Figure 3 An example diagram of configuring and implementing API connection in the invention;

[0035] Figure 4 An example diagram of flexible setting of interface encryption in the invention;

[0036] Figure 5 This is an example diagram of the interface log query in the invention. DETAILED DESCRIPTION

[0037] The technical solutions in the embodiments of the present invention will be described clearly and completely below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, rather than all the embodiments.

[0038] See also Figure 1 to Figure 2 , the present invention provides a technical solution:

[0039] A configuration system capable of realizing standard API docking of human resources master data, including an account verification module, a judgment port module, a verification timestamp module, an encryption module and a log recording module;

[0040] Account verification module, such as Figure 1 As shown, the details are as follows:

[0041] The input parameter has a mandatory item account. This value is mandatory and is used for the account information of the access interface provided by HR to consumers and the query authority of the account-related content. According to the input value, the corresponding data is queried in the database. The corresponding data includes the account query table, window query fields, and fields required for query under different conditions.

[0042] If the value is not found, an error is reported or the value does not exist, then the result is returned and recorded in the log table with error code 0003.

[0043] Through the incoming MD5, use the account, secret key, timestamp and generated MD5 to compare with the incoming MD5, through the account, sign and timestamp in the input parameters;

[0044] At the beginning of account registration, the system generates a uuid, and regenerates the sign by converting the account number + uuid + timestamp into md5;

[0045] If the system-generated content is consistent with the content passed by the interface, it means that the used uuid is the same, and this part of the verification passes;

[0046] If the verification fails, md5 is returned; the verification failure is marked with error code 0001;

[0047] Determine the port module, as follows:

[0048] Used to determine whether the query permissions of the account comply with the system configuration;

[0049] Verify the input parameter method_name, which is a fixed value provided by HR to distinguish the function of the request.

[0050] If the corresponding permissions are configured, this value is then used to distinguish different regional query codes for different required items;

[0051] If the permission for this query does not cover the other party's input, there is no relevant query permission, and the error code 0004 is marked;

[0052] Verify the timestamp module. If the timestamp verification function is enabled in the configuration, the timestamp takes effect for 10 minutes. Different interfaces are queried based on different input parameters, where the input parameter field is set to timestamp.

[0053] First, determine whether the timestamp of this query is within 10 minutes. Since the sign in the input parameter is generated by account + uuid + timestamp, the sign is only valid for 10 minutes. Therefore, use the timestamp to verify whether it is within 10 minutes from the current time. If there is an abnormality in the filling, the generated sign verification fails;

[0054] If the front-end page is in the test environment, you can close the link first and conduct joint debugging. When it goes online again, turn on the switch and mark the error code 0002.

[0055] Encryption module, as follows:

[0056] Store records in the subtable of the corresponding method. If encryption is required, use SM4 to implement encryption. Perform SM4 encryption operation on the entire return value. The encryption key SM4Key is the uuid obtained by account query.

[0057] Use the third-party library Bouncy_Castle to implement encryption functions. Add Bouncy_Castle as a security provider so that the SM4 algorithm can be used. First, create a Secret_Key_Spec object to specify the encryption key. Then use the Cipher.getInstance method to get a Cipher object, specifying the use of the SM4 algorithm, ECB mode, and PKCS7Padding padding.

[0058] The "BC" parameter specifies the use of the Bouncy_Castle provider; the encrypted return value is not stored; only the returned data content is encrypted. This is also set on the front end, and you can control whether the return value is encrypted through the front end button;

[0059] Logging modules such as Figure 2 As shown, the details are as follows:

[0060] Used for log recording operations. The logs are stored in a subtable in reverse chronological order. The maximum number of records to be displayed is set to 20 by default.

[0061] The above description is only a preferred specific implementation manner of the present invention, but the protection scope of the present invention is not limited thereto. Any technician familiar with the technical field can make equivalent replacements or changes according to the technical scheme and inventive concept of the present invention within the technical scope disclosed by the present invention, which should be covered by the protection scope of the present invention.

Claims

1. A configuration system that can realize the standard API connection of human resources master data, characterized in that: It includes an account verification module, a port judgment module, a timestamp verification module, an encryption module and a log recording module; Account verification module, as follows: The input parameter has a mandatory item account. This value is mandatory and is used for the account information of the access interface provided by HR to consumers and the query authority of the account-related content. According to the input value, the corresponding data is queried in the database. The corresponding data includes the account query table, window query fields, and fields required for query under different conditions. If the value is not found, an error is reported or the value does not exist, then the result is returned and recorded in the log table with error code 0003. Determine the port module, as follows: Used to determine whether the query permissions of the account comply with the system configuration; Verify the input parameter method_name, which is a fixed value provided by HR to distinguish the function of the request. Verify the timestamp module, as follows: If the timestamp verification function is enabled in the configuration, the timestamp takes effect for 10 minutes; If the timestamp of this query is not within 10 minutes, the generated sign check fails and the error code 0002 is marked; Encryption module, as follows: Used to store records in the subtable of the corresponding method. If encryption is required, SM4 is used to implement encryption and perform SM4 encryption operation on the overall return value. The log recording module is used to record logs, and the logs are stored in the subtable.

2. A configuration system capable of realizing standard API docking of human resources master data according to claim 1, characterized in that: The account verification module uses the incoming MD5, and uses the account, secret key, timestamp, and generated MD5 to compare with the incoming MD5, and uses the account, sign, and timestamp in the input parameters.

3. A configuration system capable of realizing standard API docking of human resources master data according to claim 2, characterized in that: At the initial stage of account registration, the system generates a uuid, and regenerates the sign by converting the account number + uuid + timestamp into md5; If the system-generated content is consistent with the content passed by the interface, it means that the used uuid is the same, and this part of the verification passes; If the verification fails, md5 is returned; if the verification fails, the error code 0001 is marked.

4. A configuration system capable of realizing standard API docking of human resources master data according to claim 1, characterized in that: The process of determining the port module is as follows: If the corresponding permissions are configured, this value is then used to distinguish different regional query codes for different required items; If the permissions for this query do not cover the other party's input, there is no relevant query permission, and the error code 0004 is marked.

5. According to claim 1, a configuration system capable of realizing standard API docking of human resources master data is characterized in that: The timestamp verification module queries different interfaces according to different input parameters, wherein the input parameter field is set to timestamp.

6. A configuration system capable of realizing standard API docking of human resources master data according to claim 1, characterized in that: The sm4Key of the encryption key in the encryption module is the uuid obtained by account query.

7. A configuration system capable of realizing standard API docking of human resources master data according to claim 1, characterized in that: The log records in the log recording module are arranged in reverse chronological order, and the upper limit of the number of displayed records is set to 20.