Credit report generation method and system, computer equipment and storage medium
By introducing the method of multi -server interaction and pre -assembly reporting reports in the credit report query system, the problem of low credit report query efficiency and data preparation of data is solved, and high -efficiency and secure credit report queries are achieved.
Patent Information
- Application Number
- CN202411343728.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-25
- Publication Date
- 2025-01-21
- Estimated Expiration
- 2044-09-25
AI Technical Summary
In the prior art, the report query timeliness caused by low centralized query efficiency and long data preparation time is poor.
Through the interaction of multiple servers, data is pre-assembled before querying corporate credit reports, and a pre-assembled report is generated. When a user query request is received, a final credit report is generated based on the pre-assembled report.
It greatly reduces the query time and improves the query efficiency. Through key encryption and blockchain certificate storage, it takes into account the timeliness and data security of credit inquiry.
Smart Images

Figure CN119337849A_ABST
Abstract
Description
Technical Field
[0001] The present application belongs to the field of data processing technology, and specifically relates to a credit report generation method, system, computer equipment, and storage medium. Background Art
[0002] Corporate credit reports play a vital role in the social credit system. They help companies, financial institutions and other organizations to comprehensively assess corporate credit status, and play a role in reducing financial credit risks and promoting the rational allocation of financial resources in the modern financial system. Ensuring the efficiency of corporate credit report query time is of great significance to promoting the convenience of financial services and improving financial service satisfaction.
[0003] In the actual credit report query business, on the one hand, user query activities are usually concentrated during daytime working hours, and the report query requests throughout the day are unevenly distributed. When the queries are too concentrated, the credit report cannot be obtained quickly; on the other hand, some credit reports involve a large amount of data, and some credit report data preparation time is long, which is also a factor that restricts the efficiency of credit report queries, resulting in poor report query timeliness; in addition, in the process of generating credit reports, it is also necessary to ensure the safe and compliant use of credit data.
[0004] Therefore, under the premise of ensuring the safe and compliant use of credit data, how to improve the efficiency of credit report queries has become a technical problem that needs to be solved urgently. Summary of the invention
[0005] The purpose of the embodiments of the present application is to propose a credit report generation method, system, computer device, and storage medium to solve the technical problems in the prior art of low efficiency in centralized credit report query and poor report query timeliness caused by long data preparation time.
[0006] In order to solve the above technical problems, the present application embodiment provides a credit report generation method, which adopts the following technical solution:
[0007] A method for generating a credit report, comprising:
[0008] Generate a report pre-assembly request through the first server, and upload the report pre-assembly request to the credit chain, wherein the report pre-assembly request includes at least one corporate identity of an enterprise;
[0009] Obtaining the report pre-assembly request from the credit chain through the second service end, generating a set of keys for each of the enterprises based on the report pre-assembly request, generating a data preparation request, obtaining a first key and a second key from the set of keys, and sending the data preparation request, the first key and the second key to a third service end;
[0010] The third server acquires the target data of each enterprise according to the data preparation request, encrypts the target data in sequence by using the first key and the second key to obtain encrypted data, uploads the encrypted data to the credit investigation chain, and sends first status information to the second server;
[0011] enabling the second server to send second state information and the second key to the first server based on the first state information;
[0012] Obtaining the encrypted data from the credit chain through the first server, decrypting the encrypted data based on the second key to obtain primary decrypted data, obtaining a preset report template, and generating a pre-assembled report based on the primary decrypted data and the preset report template;
[0013] When the first service end receives the enterprise credit inquiry request sent by the user end, it verifies the information of the queried enterprise based on the enterprise credit inquiry request and uploads the verification result to the credit investigation chain;
[0014] Acquire the verification result through the second server, and when determining that the verification is successful based on the verification result, send the first key to the first server;
[0015] The first server is enabled to decrypt the first decrypted data based on the first key to obtain the second decrypted data, obtain the pre-assembled report, and generate a credit report based on the second decrypted data and the pre-assembled report.
[0016] Furthermore, the step of encrypting the target data by using the first key and the second key in sequence to obtain encrypted data includes:
[0017] Determine designated data and non-designated data in the target data, and encrypt the designated data according to the first key to obtain first encrypted data;
[0018] Constructing a placeholder identifier, the placeholder identifier having a length consistent with the specified data, and generating a mapping relationship set between the placeholder identifier and the first encrypted data;
[0019] Encrypt the placeholder identifier and the non-specified data using the second key to obtain second encrypted data;
[0020] The mapping relationship set and the second encrypted data are used as the encrypted data.
[0021] Furthermore, the step of determining the designated data and the non-designated data in the target data includes:
[0022] Determine the classification and classification of the data object fields in the target data, match the designated target field from the data object fields of each classification and classification, use the field value corresponding to the target field as designated data, and use the field values of the remaining fields other than the target field as non-designated data; and / or
[0023] Determine the leaf fields included in the target data, obtain a preset random selection probability, randomly select some leaf fields from the leaf fields as target fields based on the random selection probability, and use the unselected leaf fields as non-specified data.
[0024] Further, when the verification is successful based on the verification result, the method further includes:
[0025] Obtaining a third key and a fourth key from the set of keys through the second server, sending the third key to the first server, and sending the third key and the fourth key to a fourth server;
[0026] When the first service end receives the corporate credit inquiry request sent by the user end, the method further includes:
[0027] Sending the fourth key to the user terminal through the second server;
[0028] After the step of generating a credit report based on the secondary decrypted data and the pre-assembled report, the method further includes:
[0029] causing the first server to encrypt the credit report according to the third key to obtain a first encrypted report, and uploading the first encrypted report to the credit chain;
[0030] The first encrypted report is obtained through the fourth server, the first encrypted report is decrypted by the third key to obtain a decrypted report, the decrypted report is then encrypted by the fourth key to obtain a second encrypted report, and the second encrypted report is uploaded to the credit chain, so that the user end obtains the second encrypted report from the credit chain, and decrypts the second encrypted report by the fourth key to obtain a credit report.
[0031] Furthermore, the step of decrypting the encrypted data based on the second key to obtain decrypted data includes:
[0032] Acquire the encrypted data, obtain the mapping relationship set and the second encrypted data according to the encrypted data, decrypt the second encrypted data by using the second key to obtain the placeholder identifier and the non-specified data, where the placeholder identifier and the non-specified data are the first decrypted data;
[0033] The step of generating a pre-assembled report based on the primary decrypted data and the preset report template comprises:
[0034] Determine the elements to be filled in the preset report template and the preset filling rules, structure the placeholders and the non-specified data to obtain structured data, fill the preset report template according to the structured data and the preset filling rules, and generate a pre-assembled report in a target format based on the preset report template after the data is filled, wherein the pre-assembled report includes placeholders.
[0035] Furthermore, the step of generating a credit report based on the secondary decrypted data and the pre-assembled report includes:
[0036] Determine a placeholder in the pre-assembled report, determine first encrypted data according to the placeholder and the mapping relationship set, decrypt the first encrypted data according to the first key to obtain the designated data, and replace the placeholder in the area of the pre-assembled report with the designated data by text replacement or layer overlay to obtain a credit report.
[0037] Furthermore, before the step of obtaining, through the first service end, the corporate credit inquiry request sent by the user end, the method further includes:
[0038] The user terminal uploads the basic information and authorization information of the queried enterprise to the credit investigation chain;
[0039] The step of verifying the information of the queried enterprise based on the enterprise credit inquiry request includes:
[0040] The first service end obtains the basic information and authorization information of the queried enterprise from the credit chain, verifies the consistency of the basic information and the validity of the authorization information, obtains the verification result and uploads it to the credit chain.
[0041] In order to solve the above technical problems, the present application also provides a credit report generation system, which adopts the following technical solutions:
[0042] A credit report generation system, the system comprising a first server, a second server and a third server;
[0043] The first server is used to generate a report pre-assembly request and upload the report pre-assembly request to the credit chain, wherein the report pre-assembly request includes at least one corporate identity of an enterprise;
[0044] The second server is used to obtain the report pre-assembly request from the credit chain, generate a set of keys for each of the enterprises based on the report pre-assembly request, generate a data preparation request, obtain a first key and a second key from the set of keys, and send the data preparation request, the first key and the second key to the third server;
[0045] The third server is used to obtain the target data of each of the enterprises according to the data preparation request, encrypt the target data in sequence by using the first key and the second key to obtain encrypted data, upload the encrypted data to the credit investigation chain, and send first status information to the second server;
[0046] The second server is further configured to send second state information and the second key to the first server based on the first state information;
[0047] The first server is further configured to obtain the encrypted data from the credit chain, decrypt the encrypted data based on the second key to obtain primary decrypted data, obtain a preset report template, and generate a pre-assembled report based on the primary decrypted data and the preset report template; and when receiving a corporate credit inquiry request sent by a user end, verify the information of the queried enterprise based on the corporate credit inquiry request, and upload the verification result to the credit chain;
[0048] The second server is further configured to obtain the verification result, and when the verification is determined to be successful based on the verification result, send the first key to the first server;
[0049] The first server is also used to decrypt the first decrypted data based on the first key to obtain the second decrypted data, obtain the pre-assembled report, and generate a credit report based on the second decrypted data and the pre-assembled report.
[0050] In order to solve the above technical problems, the embodiment of the present application further provides a computer device, which adopts the following technical solution:
[0051] A computer device comprises a memory and a processor, wherein the memory stores computer-readable instructions, and when the processor executes the computer-readable instructions, the steps of the credit report generation method as described in any one of the above items are implemented.
[0052] In order to solve the above technical problems, the embodiment of the present application further provides a computer-readable storage medium, which adopts the following technical solution:
[0053] A computer-readable storage medium having computer-readable instructions stored thereon, wherein the computer-readable instructions, when executed by a processor, implement the steps of the credit report generation method as described in any one of the above.
[0054] Compared with the prior art, the embodiments of the present application have the following beneficial effects:
[0055] This application realizes the interaction of multiple servers based on the credit chain. Before querying the corporate credit, the credit data is pre-assembled through multiple servers to obtain a pre-assembled report. Whenever a corporate credit query request is received, the final credit report is generated through the pre-assembled report, which can greatly reduce the query time and improve the query efficiency. In addition, various requests and data in the multi-server interaction process are encrypted with a key and saved in the credit chain to realize process evidence storage, taking into account the timeliness and data security of the credit query. BRIEF DESCRIPTION OF THE DRAWINGS
[0056] In order to more clearly illustrate the scheme in the present application, a brief introduction is given below to the drawings required for use in the description of the embodiments of the present application. Obviously, the drawings described below are some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0057] Figure 1 An exemplary system architecture diagram is shown in which the present application can be applied;
[0058] Figure 2 A flow chart showing an embodiment of a method for generating a credit report according to the present application is shown;
[0059] Figure 3 A structural schematic diagram of an embodiment of a credit report generation system according to the present application is shown;
[0060] Figure 4 A structural schematic diagram of another embodiment of a credit report generation system according to the present application is shown;
[0061] Figure 5 A schematic structural diagram of an embodiment of a computer device according to the present application is shown. DETAILED DESCRIPTION
[0062] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by technicians in the technical field of the present application; the terms used in the specification of the application herein are only for the purpose of describing specific embodiments and are not intended to limit the present application; the terms "including" and "having" and any variations thereof in the specification and claims of the present application and the above-mentioned drawings are intended to cover non-exclusive inclusions. The terms "first", "second", etc. in the specification and claims of the present application or the above-mentioned drawings are used to distinguish different objects, not to describe a specific order.
[0063] Reference to "embodiments" herein means that a particular feature, structure, or characteristic described in conjunction with the embodiments may be included in at least one embodiment of the present application. The appearance of the phrase in various locations in the specification does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment that is mutually exclusive with other embodiments. It is explicitly and implicitly understood by those skilled in the art that the embodiments described herein may be combined with other embodiments.
[0064] In order to enable those skilled in the art to better understand the solution of the present application, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the accompanying drawings.
[0065] like Figure 1 As shown, the system architecture 100 may include a terminal device 101, a network 102 and a server 103. The terminal device 101 may be a laptop 1011, a tablet computer 1012 or a mobile phone 1013. The network 102 is used to provide a medium for a communication link between the terminal device 101 and the server 103. The network 102 may include various connection types, such as wired, wireless communication links or optical fiber cables.
[0066] The user can use the terminal device 101 to interact with the server 103 through the network 102 to receive or send messages, etc. Various communication client applications can be installed on the terminal device 101, such as web browser applications, shopping applications, search applications, instant messaging tools, email clients, social platform software, etc.
[0067] The terminal device 101 may be any electronic device having a display screen and supporting web browsing. In addition to a notebook computer 1011 , a tablet computer 1012 or a mobile phone 1013 , the terminal device 101 may also be a laptop computer, a desktop computer, and the like.
[0068] The server 103 may be a server that provides various services, such as a background server that provides support for a web page displayed on the terminal device 101 .
[0069] It should be noted that the credit report generation method provided in the embodiment of the present application is generally executed by a server. Specifically, the credit report generation method provided in the present embodiment is interactively executed by multiple servers. Accordingly, a credit report generation system is provided, which includes multiple servers for interactively executing the credit report generation method.
[0070] It should be understood that Figure 1 The number of terminal devices 101, networks 102 and servers 103 in the embodiment is only for illustration. Any number of terminal devices 101, networks 102 and servers 103 may be provided according to implementation requirements.
[0071] Continue to refer Figure 2 , shows a flow chart of an embodiment of a credit reporting method according to the present application. The credit reporting method comprises the following steps S201 to S208:
[0072] S201, generating a report pre-assembly request through a first server, and uploading the report pre-assembly request to a credit reporting chain, wherein the report pre-assembly request includes at least one corporate identification of a company.
[0073] In this embodiment, the report pre-assembly request is used to trigger the generation of the pre-assembly report, which can be generated regularly or triggered when there is data update of any object. The generation of the credit report has multiple participants, including management agencies, data agencies, financial institutions and credit agencies, etc., among which the first service end exists in the credit agency and provides credit report generation services.
[0074] In this embodiment, the credit chain is the specific implementation of blockchain in the field of credit reporting. It uses the distributed ledger technology, encryption algorithm, smart contract and other functions of blockchain to solve the problems of data silos, information asymmetry, insufficient data security, etc. existing in the traditional credit reporting system.
[0075] In this embodiment, the enterprise identification may be an enterprise code or other information that can be used to identify an enterprise.
[0076] In this embodiment, a report pre-assembly request can be generated at any time, especially during non-working hours. By performing report pre-assembly during non-working hours, the efficiency of credit report query can be improved in situations such as subsequent centralized query or time-consuming data preparation.
[0077] S202, obtaining the report pre-assembly request from the credit chain through the second server, generating a set of keys for each of the enterprises based on the report pre-assembly request, and generating a data preparation request, obtaining the first key and the second key from the set of keys, and sending the data preparation request, the first key and the second key to the third server.
[0078] In this embodiment, the second service end exists in the management agency, and the management agency focuses on services such as overall supervision authorization.
[0079] In this embodiment, the generated key is used for symmetric encryption.
[0080] In this embodiment, the data preparation request is used to obtain data for generating a credit report, ie, target data, from a subsequent third server.
[0081] S203, enables the third server to obtain the target data of each of the enterprises according to the data preparation request, encrypts the target data in turn by using the first key and the second key to obtain encrypted data, uploads the encrypted data to the credit chain, and sends first status information to the second server.
[0082] In this embodiment, the third server exists in the data organization, and the data organization focuses on data collection, analysis, etc.
[0083] In this embodiment, the first status information refers to the notification information that the third server has completed uploading the encrypted data to the credit chain. The notification information can be sent directly to the second server, or it can be uploaded to the credit chain first for process storage to ensure data security and compliance.
[0084] S204: Enable the second server to send second state information and the second key to the first server based on the first state information.
[0085] In this embodiment, the second status information refers to credit report pre-assembly permission information, authorizing the first server to pre-assemble the credit report.
[0086] S205, obtaining the encrypted data from the credit chain through the first server, decrypting the encrypted data based on the second key to obtain one-time decrypted data, and obtaining a preset report template, and generating a pre-assembled report based on the one-time decrypted data and the preset report template.
[0087] In this embodiment, the preset report template is used for dynamic data filling. This embodiment completes this dynamic filling operation in the pre-assembly stage, which can save the data filling time when the credit report is queried. Taking the example of dynamically filling data in HTML template to generate PDF report, the preset report template includes template elements such as text paragraphs, form components, chart components, etc., and the template element filling rules are defined. For example, the element filling rules are as follows:
[0088] The placeholder ${PLACEHOLDER} is used to indicate that the position needs to be replaced with the data with the identifier name PLACEHOLDER in the data to be filled;
[0089] The placeholder ${PLACEHOLDER.FI ELD} is used to indicate that the position needs to be replaced with the FI ELD field of the data object whose identification name is PLACEHOLDER in the data to be filled;
[0090] Use placeholder <#list PLACEHOLDER>${PLACEHOLDER.FI ELD}< / #l i st> The nested combination indicates that the data with the identifier name PLACEHOLDER in the data to be filled is an array. The array is traversed and the FI ELD field in the array object is cyclically filled to the position of the placeholder.
[0091] Of course, other filling rules can also be defined, which are not limited here.
[0092] S206, when the first service end receives the enterprise credit inquiry request sent by the user end, it verifies the information of the queried enterprise based on the enterprise credit inquiry request, and uploads the verification result to the credit chain.
[0093] In this embodiment, the user end exists in a financial institution, which provides various financial products and services such as loans, deposits, insurance, etc. to support the financial needs of individuals and enterprises, and therefore has a need for credit inquiry.
[0094] In one embodiment, before the step of obtaining the corporate credit inquiry request sent by the user terminal through the first service terminal, the method further includes: enabling the user terminal to upload basic information and authorization information of the queried enterprise to the credit chain.
[0095] Correspondingly, the step of verifying the information of the queried enterprise based on the enterprise credit inquiry request includes: obtaining the basic information and authorization information of the queried enterprise from the credit chain through the first server, verifying the consistency of the basic information and the validity of the authorization information, obtaining the verification result and uploading it to the credit chain.
[0096] This embodiment verifies the identity of the user who submits the query request on the user side to ensure that the user who submits the query request is a compliant and authorized enterprise to ensure data security. The information of the queried enterprise includes basic enterprise information and authorization information. The authorization information can specifically be an enterprise authorization letter, which is electronically signed by a CA organization. Therefore, when performing verification, the signature verification interface of the CA organization can be called to verify the validity of the signature and the consistency of the enterprise information.
[0097] S207: Obtain the verification result through the second server, and when it is determined based on the verification result that the verification is successful, send the first key to the first server.
[0098] In this embodiment, if the verification is successful, the credit chain smart contract drives the second server to share the first key with the first server.
[0099] S208, enabling the first server to decrypt the first decrypted data based on the first key to obtain the second decrypted data, and obtain the pre-assembled report, and generate a credit report based on the second decrypted data and the pre-assembled report.
[0100] This application realizes the interaction of multiple servers based on the credit chain. Before querying the corporate credit, the credit data is pre-assembled through multiple servers to obtain a pre-assembled report. Whenever a corporate credit query request is received, the final credit report is generated through the pre-assembled report, which can greatly reduce the query time and improve the query efficiency. In addition, various requests and data in the multi-server interaction process are encrypted with a key and saved in the credit chain to realize process evidence storage, taking into account the timeliness and data security of the credit query.
[0101] In one embodiment, for step S202, the step of encrypting the target data by using the first key and the second key in sequence to obtain encrypted data includes:
[0102] Determine designated data and non-designated data in the target data, encrypt the designated data according to the first key to obtain first encrypted data; construct a placeholder marker, the placeholder marker has the same length as the designated data, and generate a mapping relationship set between the placeholder marker and the first encrypted data; encrypt the placeholder marker and the non-designated data by the second key to obtain second encrypted data; use the mapping relationship set and the second encrypted data as the encrypted data.
[0103] In this embodiment, the designated data specifically refers to sensitive data fields and their field values. Specifically, the target data may be JSON data, which includes key-value pairs of several JSON leaf fields. KV (key, value) is used to represent the key-value pairs of JSON leaf fields. For example, as shown in Table 1 below, KV (JSON_OBJECT.FI LED_1, field value 1) indicates that the value of the FI LED_1 field of the JSON_OBJECT object is "field value 1"; (JSON_ARRAY@0.FI LED_a, field value 4) indicates that the value of the FI LED_a field of the 0th element of the JSON_ARRAY array is "field value 4".
[0104] Table 1
[0105] JSON_OBJECT.FILED_1 Field value 1 JSON_OBJECT.FILED_2 Field value 2 JSON_OBJECT.FILED_3 Field value 3 JSON_ARRAY@0.FILED_a Field value 4 JSON_ARRAY@0.FILED_b Field value 5 JSON_ARRAY@0.FILED_c Field value 6 JSON_ARRAY@1.FILED_a Field value 7 JSON_ARRAY@1.FILED_b Field value 8 JSON_ARRAY@1.FILED_c Field value 9
[0106] The encryption process of this step is described below in conjunction with symmetric encryption. The symmetric encryption of this embodiment is represented by the following method:
[0107] P represents plain text, k represents key, S=SE(P, k) represents cipher text obtained by symmetric encryption of plain text P using key k, and SD(S, k) represents plain text obtained by symmetric decryption of cipher text S using key k. According to the principle of symmetric encryption, SD(SE(P, k), k)=P.
[0108] Based on this, for the selected sensitive data field KV(k1, v1), the value v1 is encrypted using the first key b to obtain the first encrypted data SE(v1, b); the placeholder identifier i 1 of the encrypted sensitive field is constructed, and the mapping relationship KV(i 1, SE(v1, b)) between the placeholder identifier and the encrypted data is generated. The mapping relationship will be uploaded to the credit chain for storage, and so on. The mapping relationship set obtained for multiple sensitive fields is shown in Table 2 below:
[0109] Table 2
[0110] i1 SE("field value 3", b) i2 SE("field value 5", b) i3 SE("field value 8", b)
[0111] The length of i1 is consistent with the length of v1. After encryption by the first key b, KV(k1, v1) in the original data is replaced by KV(k1, i1). Similarly, after the sensitive fields in Table 1 above are encrypted based on the first key b, they will be converted into Table 3 below:
[0112] Table 3
[0113] JSON_OBJECT.FILED_1 Field value 1 JSON_OBJECT.FILED_2 Field value 2 JSON_OBJECT.FILED_3 i1 JSON_ARRAY@0.FILED_a Field value 4 JSON_ARRAY@0.FILED_b i2 JSON_ARRAY@0.FILED_c Field value 6 JSON_ARRAY@1.FILED_a Field value 7 JSON_ARRAY@1.FILED_b i3 JSON_ARRAY@1.FILED_c Field value 9
[0114] Based on Table 3, the second key a is used to encrypt the placeholder identifiers i1, i2, i3, and non-specified data (other data except the placeholder identifiers in Table 3) to obtain second encrypted data, and the second encrypted data is uploaded to the credit chain for storage.
[0115] Through this embodiment, some data can be encrypted and uploaded to the chain in a targeted manner, so that before the final authorization to query the credit report, the inquirer cannot obtain the available complete credit information, thereby preventing the pre-assembled report from being used illegally or leaked by a network attack before formal authorization, and effectively ensuring data security.
[0116] In a further embodiment, the step of determining the designated data and the non-designated data in the target data includes:
[0117] Determine the classification and classification of the data object fields in the target data, match the designated target field from the data object fields of each classification and classification, use the field value corresponding to the target field as designated data, and use the field values of the remaining fields other than the target field as non-designated data; and / or
[0118] Determine the leaf fields included in the target data, obtain a preset random selection probability, randomly select some leaf fields from the leaf fields as target fields based on the random selection probability, and use the unselected leaf fields as non-specified data.
[0119] In this embodiment, the sensitive data to be encrypted can be determined more accurately based on data classification and grading (field name matching method). For example, for the fields in Table 1, the FI LED_3 field of the JSON_OBJECT data object and the FI LED_b field of the JSON_ARRAY array element are selected as sensitive data, and the encrypted data is represented as shown in Table 3.
[0120] As for the random selection method, some leaf fields are randomly selected as sensitive data by setting a random probability. For example, when the random probability is 1 / 3, a possible sensitive data encryption representation of Table 1 is shown in Table 4 below:
[0121] Table 4
[0122] JSON_OBJECT.FILED_1 i1 JSON_OBJECT.FILED_2 Field value 2 JSON_OBJECT.FILED_3 i2 JSON_ARRAY@0.FILED_a Field value 4 JSON_ARRAY@0.FILED_b Field value 5 JSON_ARRAY@0.FILED_c Field value 6 JSON_ARRAY@1.FILED_a Field value 7 JSON_ARRAY@1.FILED_b Field value 8 JSON_ARRAY@1.FILED_c i3
[0123] In this embodiment, the selection of sensitive data to be encrypted is made more flexible by means of random probability, which can improve data security to a certain extent.
[0124] In a further embodiment, when the verification is determined to be successful based on the verification result, the method also includes: obtaining a third key and a fourth key from the set of keys through the second server, sending the third key to the first server, and sending the third key and the fourth key to a fourth server, wherein the fourth server exists in an administrative agency, and is used to achieve cross-organizational secure delivery of credit reports under security supervision, thereby enhancing the regulator's ability to control the process.
[0125] Correspondingly, when the first server receives the corporate credit inquiry request sent by the user terminal, the method further includes: sending the fourth key to the user terminal through the second server terminal.
[0126] Correspondingly, after the step of generating a credit report based on the secondary decrypted data and the pre-assembled report, the method also includes: enabling the first server to encrypt the credit report according to the third key to obtain a first encrypted report, and uploading the first encrypted report to the credit chain; obtaining the first encrypted report through the fourth server, decrypting the first encrypted report through the third key to obtain a decrypted report, and then encrypting the decrypted report through the fourth key to obtain a second encrypted report, and uploading the second encrypted report to the credit chain, so that the user end obtains the second encrypted report from the credit chain, and decrypts the second encrypted report through the fourth key to obtain a credit report.
[0127] In this embodiment, after pre-assembly is completed through a combination of multiple keys, the keys involved in the actual authorization query stage are shared through the smart contract trigger, and the keys of the report provider and the report inquirer are replaced through the fourth server, thereby improving the regulator's ability to control the process, and effectively isolating the report generator and the report acquirer through the fourth server, which can ensure the security and compliance of the credit report data.
[0128] In a further embodiment, the step of decrypting the encrypted data based on the second key to obtain the first decrypted data includes: acquiring the encrypted data, obtaining the mapping relationship set and the second encrypted data according to the encrypted data, decrypting the second encrypted data by using the second key to obtain the placeholder identifier and the non-specified data, wherein the placeholder identifier and the non-specified data are the first decrypted data;
[0129] Correspondingly, the step of generating a preassembled report based on the once decrypted data and the preset report template includes: determining the elements to be filled in the preset report template and the preset filling rules, structuring the placeholder identifier and the non-specified data to obtain structured data, filling the preset report template according to the structured data and the preset filling rules, and generating a preassembled report in a target format based on the preset report template after the data is filled, wherein the preassembled report includes a placeholder identifier.
[0130] In this embodiment, a specific data format (such as JSON) is used to structure the data that needs to be used with the report template (i.e., the placeholder identifier and the non-specified data). The following JSON format example text contains a data object named JSON_OBJECT and a data array named JSON_ARRAY. The data field names of JSON_OBJECT are FI LED_1, FI LED_2, and FI LED_3. The array elements of JSON_ARRAY are data objects, and the field names of the data objects are FI LED_a, FI LED_b, and FI LED_c:
[0131]
[0132] When filling data, fill the prepared structured report data into the report template according to the data filling rules. For example, using the above JSON example to fill the HTML template will produce the following effect:
[0133] Fields filled:
[0134] “ Report name: ${JSON_OBJECT.FI LED_1} "After filling, we get" Report Name: Field Value 1 ”.
[0135] Array filling:
[0136]
[0137] After filling we get:
[0138]
[0139] After filling in the template, the template filled with data is converted into a report format file (such as converting an HTML file into a PDF report). This process is the most time-consuming part when dynamically filling data. Executing this process in a pre-assembly manner can reduce the time spent on subsequent queries and improve query efficiency.
[0140] In some embodiments, the generated report may also be processed, such as adding new content, modifying content, adding layers, etc. to the generated report.
[0141] In a further embodiment, the step of generating a credit report based on the secondary decrypted data and the pre-assembled report includes: determining a placeholder in the pre-assembled report, determining first encrypted data based on the placeholder and the mapping relationship set, decrypting the first encrypted data based on the first key to obtain the designated data, and replacing the placeholder in the area of the pre-assembled report with the designated data by text replacement or layer overlay to obtain a credit report.
[0142] Since this step replaces the placeholder identifier based on the pre-assembled report, it can greatly shorten the generation time of the credit report and improve the query efficiency when the credit report is centrally queried or the data preparation is complex.
[0143] It should be noted that, since the pre-assembly report stage has completed time-consuming operations such as data query, data processing, and target format file conversion, the generated pre-assembly report encrypts and replaces some content to ensure data security. At the same time, all types of requests, verification results, encrypted data, and encrypted reports in the above embodiments are uploaded to the credit chain to realize process evidence and improve the reliability of credit report generation. The credit report generation method of this embodiment takes into account both timeliness and security.
[0144] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiments can be implemented by instructing the relevant hardware through a computer program, and the computer program can be stored in a computer-readable storage medium. When the program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, the aforementioned storage medium can be a non-volatile storage medium such as a disk, an optical disk, a read-only memory (ROM), or a random access memory (RAM).
[0145] It should be understood that, although the steps in the flowchart of the accompanying drawings are displayed in sequence as indicated by the arrows, these steps are not necessarily executed in sequence in the order indicated by the arrows. Unless otherwise specified herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least a part of the steps in the flowchart of the accompanying drawings may include multiple sub-steps or multiple stages, and these sub-steps or stages are not necessarily executed at the same time, but can be executed at different times, and their execution order is not necessarily sequential, but can be executed in turn or alternately with other steps or at least a part of the sub-steps or stages of other steps.
[0146] Further references Figure 3 , as a response to the above Figure 2 The present application provides an embodiment of a credit report generation system, which is similar to Figure 2 The method embodiment shown corresponds to the embodiment shown in FIG. Figure 3 As shown, the credit report generation system 300 described in this embodiment includes: a first server 301, a second server 302 and a third server 303. Among them:
[0147] The first server 301 is used to generate a report pre-assembly request and upload the report pre-assembly request to the credit chain, wherein the report pre-assembly request includes at least one corporate identity of an enterprise;
[0148] The second server 302 is used to obtain the report pre-assembly request from the credit chain, generate a set of keys for each of the enterprises based on the report pre-assembly request, generate a data preparation request, obtain a first key and a second key from the set of keys, and send the data preparation request, the first key and the second key to the third server 303;
[0149] The third server 303 is used to obtain the target data of each enterprise according to the data preparation request, encrypt the target data in turn by using the first key and the second key to obtain encrypted data, upload the encrypted data to the credit investigation chain, and send first status information to the second server 302;
[0150] The second server 302 is further configured to send second state information and the second key to the first server 301 based on the first state information;
[0151] The first server 301 is also used to obtain the encrypted data from the credit chain, decrypt the encrypted data based on the second key to obtain the first decrypted data, obtain the preset report template, and generate a pre-assembled report based on the first decrypted data and the preset report template; and when receiving the enterprise credit inquiry request sent by the user end, verify the information of the queried enterprise based on the enterprise credit inquiry request, and upload the verification result to the credit chain;
[0152] The second server 302 is further configured to obtain the verification result, and when the verification is successful based on the verification result, send the first key to the first server 301;
[0153] The first server 301 is further configured to decrypt the first decrypted data based on the first key to obtain the second decrypted data, obtain the pre-assembled report, and generate a credit report based on the second decrypted data and the pre-assembled report.
[0154] The credit report generation system provided in this application realizes the interaction of multiple servers based on the credit chain. Before querying the enterprise credit, the credit data is pre-assembled through multiple servers to obtain a pre-assembled report. Whenever an enterprise credit query request is received, the final credit report is generated through the pre-assembled report, which can greatly reduce the query time and improve the query efficiency. In addition, various requests and data in the process of multi-server interaction are encrypted with a key and saved in the credit chain to realize process evidence storage, taking into account the timeliness and data security of the credit query.
[0155] In one embodiment, the third server 303 encrypts the target data in sequence by using the first key and the second key to obtain the encrypted data, and is specifically used to: determine the designated data and the non-designated data in the target data, and encrypt the designated data according to the first key to obtain the first encrypted data; construct a placeholder marker, the placeholder marker has the same length as the designated data, and generate a mapping relationship set between the placeholder marker and the first encrypted data; encrypt the placeholder marker and the non-designated data by using the second key to obtain the second encrypted data; and use the mapping relationship set and the second encrypted data as the encrypted data.
[0156] In one embodiment, when the third server 303 determines the designated data and non-designated data in the target data, it is specifically used to: determine the classification and grading of the data object fields in the target data, match the designated target field from each of the classified and graded data object fields, use the field value corresponding to the target field as the designated data, and use the field values of the remaining fields other than the target field as non-designated data; and / or determine the leaf fields contained in the target data, obtain a preset random selection probability, randomly select some leaf fields from the leaf fields as target fields based on the random selection probability, and use the unselected leaf fields as non-designated data.
[0157] In one embodiment, Figure 4 As shown, the credit report generation system also includes a fourth server 304. When the second server 302 determines that the verification is successful based on the verification result, it is also used to obtain a third key and a fourth key from the set of keys, send the third key to the first server 301, and send the third key and the fourth key to the fourth server 304.
[0158] Correspondingly, the second server 302 is also used to send the fourth key to the user end when the first server 301 receives the corporate credit inquiry request sent by the user end.
[0159] Correspondingly, the first server 301 is also used to encrypt the credit report according to the third key to obtain a first encrypted report after generating a credit report based on the secondary decrypted data and the pre-assembled report, and upload the first encrypted report to the credit chain; the fourth server 304 is used to obtain the first encrypted report, decrypt the first encrypted report by using the third key to obtain a decrypted report, and then encrypt the decrypted report by using the fourth key to obtain a second encrypted report, and upload the second encrypted report to the credit chain, so that the user end obtains the second encrypted report from the credit chain, and decrypts the second encrypted report by using the fourth key to obtain the credit report.
[0160] In one embodiment, the first server 301 decrypts the encrypted data based on the second key, and when obtaining the first decrypted data, it is specifically used to: obtain the encrypted data, obtain the mapping relationship set and the second encrypted data according to the encrypted data, decrypt the second encrypted data by using the second key, and obtain the placeholder identifier and the non-specified data, wherein the placeholder identifier and the non-specified data are the first decrypted data;
[0161] Correspondingly, when the first server 301 generates a pre-assembled report based on the one-time decrypted data and the preset report template, it is specifically used to: determine the elements to be filled in the preset report template and the preset filling rules, structure the placeholder identifier and the non-specified data to obtain structured data, fill the preset report template according to the structured data and the preset filling rules, and generate a pre-assembled report in a target format based on the preset report template after the data is filled, wherein the pre-assembled report includes a placeholder identifier.
[0162] In one embodiment, when the first server 301 generates a credit report based on the secondary decrypted data and the pre-assembled report, it is specifically used to: determine a placeholder in the pre-assembled report, determine first encrypted data according to the placeholder and the mapping relationship set, decrypt the first encrypted data according to the first key to obtain the specified data, and replace the placeholder in the area of the pre-assembled report with the specified data by text replacement or layer overlay to obtain a credit report.
[0163] In one embodiment, the user terminal is used to upload basic information and authorization information of the queried enterprise to the credit chain before the first server 301 obtains the enterprise credit inquiry request sent by the user terminal.
[0164] Correspondingly, when the first server 301 verifies the information of the queried enterprise based on the enterprise credit inquiry request, it is specifically used to obtain the basic information and authorization information of the queried enterprise from the credit chain, verify the consistency of the basic information and the validity of the authorization information, obtain the verification results and upload them to the credit chain.
[0165] It should be noted that the beneficial effects of the interaction process between the first server 301, the second server 302, the third server 303 and the fourth server 304, the user end and the credit chain can be referred to the above method embodiment and will not be expanded here.
[0166] To solve the above technical problems, the present application also provides a computer device. Figure 5 , Figure 5 This is a basic structural block diagram of the computer device in this embodiment.
[0167] The computer device 4 includes a memory 41, a processor 42, and a network interface 43 that are interconnected through a system bus. It should be noted that the figure only shows a computer device 4 having a memory 41, a processor 42, and a network interface 43, but it should be understood that it is not required to implement all the components shown, and more or fewer components can be implemented instead. Among them, those skilled in the art can understand that the computer device here is a device that can automatically perform numerical calculations and / or information processing according to pre-set or stored instructions, and its hardware includes but is not limited to a microprocessor, an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), a digital processor (DSP), an embedded device, etc.
[0168] The computer device may be a computing device such as a desktop computer, a notebook, a PDA, a cloud server, etc. The computer device may interact with a user through a keyboard, a mouse, a remote controller, a touch pad, or a voice control device.
[0169] The memory 41 includes at least one type of readable storage medium, and the readable storage medium includes flash memory, hard disk, multimedia card, card-type memory (for example, SD or DX memory, etc.), random access memory (RAM), static random access memory (SRAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), programmable read-only memory (PROM), magnetic memory, disk, optical disk, etc. In some embodiments, the memory 41 can be an internal storage unit of the computer device 4, such as a hard disk or memory of the computer device 4. In other embodiments, the memory 41 can also be an external storage device of the computer device 4, such as a plug-in hard disk equipped on the computer device 4, a smart memory card (Smart Med ia Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (Fl ash Card), etc. Of course, the memory 41 can also include both the internal storage unit of the computer device 4 and its external storage device. In this embodiment, the memory 41 is generally used to store the operating system and various application software installed on the computer device 4, such as the program code of the credit report generation method, etc. In addition, the memory 41 can also be used to temporarily store various types of data that have been output or are to be output.
[0170] The processor 42 may be a central processing unit (CPU), a controller, a microcontroller, a microprocessor, or other data processing chips in some embodiments. The processor 42 is generally used to control the overall operation of the computer device 4. In this embodiment, the processor 42 is used to run the program code stored in the memory 41 or process data, such as running the program code of the credit report generation method.
[0171] The network interface 43 may include a wireless network interface or a wired network interface. The network interface 43 is generally used to establish a communication connection between the computer device 4 and other electronic devices.
[0172] The present application also provides another embodiment, namely, providing a computer-readable storage medium, wherein the computer-readable storage medium stores computer-readable instructions, and the computer-readable instructions can be executed by at least one processor to enable the at least one processor to perform the steps of the credit report generation method as described above.
[0173] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present application, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk), and includes a number of instructions for a terminal device (which can be a mobile phone, computer, server, air conditioner, or network device, etc.) to execute the methods described in each embodiment of the present application.
[0174] Obviously, the embodiments described above are only some embodiments of the present application, rather than all embodiments. The preferred embodiments of the present application are given in the accompanying drawings, but they do not limit the patent scope of the present application. The present application can be implemented in many different forms. On the contrary, the purpose of providing these embodiments is to make the understanding of the disclosure of the present application more thorough and comprehensive. Although the present application is described in detail with reference to the aforementioned embodiments, for those skilled in the art, it is still possible to modify the technical solutions recorded in the aforementioned specific implementation methods, or to perform equivalent replacement of some of the technical features therein. Any equivalent structure made using the contents of the specification and drawings of this application, directly or indirectly used in other related technical fields, is similarly within the scope of patent protection of this application.
Claims
1. A method for generating a credit report, characterized in that: include: Generate a report pre-assembly request through the first server, and upload the report pre-assembly request to the credit chain, wherein the report pre-assembly request includes at least one corporate identity of an enterprise; Obtaining the report pre-assembly request from the credit chain through the second service end, generating a set of keys for each of the enterprises based on the report pre-assembly request, generating a data preparation request, obtaining a first key and a second key from the set of keys, and sending the data preparation request, the first key and the second key to a third service end; The third server acquires the target data of each enterprise according to the data preparation request, encrypts the target data in sequence by using the first key and the second key to obtain encrypted data, uploads the encrypted data to the credit investigation chain, and sends first status information to the second server; enabling the second server to send second state information and the second key to the first server based on the first state information; Obtaining the encrypted data from the credit chain through the first server, decrypting the encrypted data based on the second key to obtain primary decrypted data, obtaining a preset report template, and generating a pre-assembled report based on the primary decrypted data and the preset report template; When the first service end receives the enterprise credit inquiry request sent by the user end, it verifies the information of the queried enterprise based on the enterprise credit inquiry request and uploads the verification result to the credit investigation chain; Acquire the verification result through the second server, and when determining that the verification is successful based on the verification result, send the first key to the first server; The first server is enabled to decrypt the first decrypted data based on the first key to obtain the second decrypted data, obtain the pre-assembled report, and generate a credit report based on the second decrypted data and the pre-assembled report.
2. The credit report generation method according to claim 1, characterized in that: The step of encrypting the target data by using the first key and the second key in sequence to obtain the encrypted data comprises: Determine designated data and non-designated data in the target data, and encrypt the designated data according to the first key to obtain first encrypted data; Constructing a placeholder identifier, the placeholder identifier having a length consistent with the specified data, and generating a mapping relationship set between the placeholder identifier and the first encrypted data; Encrypt the placeholder identifier and the non-specified data using the second key to obtain second encrypted data; The mapping relationship set and the second encrypted data are used as the encrypted data.
3. The credit report generation method according to claim 2, characterized in that: The step of determining the designated data and non-designated data in the target data comprises: Determine the classification and classification of the data object fields in the target data, match the designated target field from the data object fields of each classification and classification, use the field value corresponding to the target field as designated data, and use the field values of the remaining fields other than the target field as non-designated data; and / or Determine the leaf fields included in the target data, obtain a preset random selection probability, randomly select some leaf fields from the leaf fields as target fields based on the random selection probability, and use the unselected leaf fields as non-specified data.
4. The credit report generation method according to claim 2 or 3, characterized in that: When the verification is successful based on the verification result, the method further includes: Obtaining a third key and a fourth key from the set of keys through the second server, sending the third key to the first server, and sending the third key and the fourth key to a fourth server; When the first service end receives the enterprise credit inquiry request sent by the user end, the method further includes: Sending the fourth key to the user terminal through the second server; After the step of generating a credit report based on the secondary decrypted data and the pre-assembled report, the method further includes: causing the first server to encrypt the credit report according to the third key to obtain a first encrypted report, and uploading the first encrypted report to the credit chain; The first encrypted report is obtained through the fourth server, the first encrypted report is decrypted by the third key to obtain a decrypted report, the decrypted report is then encrypted by the fourth key to obtain a second encrypted report, and the second encrypted report is uploaded to the credit chain, so that the user end obtains the second encrypted report from the credit chain, and decrypts the second encrypted report by the fourth key to obtain a credit report.
5. The credit report generation method according to claim 4, characterized in that: The step of decrypting the encrypted data based on the second key to obtain decrypted data comprises: Acquire the encrypted data, obtain the mapping relationship set and the second encrypted data according to the encrypted data, decrypt the second encrypted data by using the second key to obtain the placeholder identifier and the non-specified data, where the placeholder identifier and the non-specified data are the first decrypted data; The step of generating a pre-assembled report based on the primary decrypted data and the preset report template comprises: Determine the elements to be filled in the preset report template and the preset filling rules, structure the placeholders and the non-specified data to obtain structured data, fill the preset report template according to the structured data and the preset filling rules, and generate a pre-assembled report in a target format based on the preset report template after the data is filled, wherein the pre-assembled report includes placeholders.
6. The credit report generation method according to claim 5, characterized in that: The step of generating a credit report based on the secondary decrypted data and the pre-assembled report comprises: Determine a placeholder in the pre-assembled report, determine first encrypted data according to the placeholder and the mapping relationship set, decrypt the first encrypted data according to the first key to obtain the designated data, and replace the placeholder in the area of the pre-assembled report with the designated data by text replacement or layer overlay to obtain a credit report.
7. The credit report generation method according to claim 6, characterized in that: Before the step of obtaining, through the first service end, the corporate credit inquiry request sent by the user end, the method further includes: The user terminal uploads the basic information and authorization information of the queried enterprise to the credit investigation chain; The step of verifying the information of the queried enterprise based on the enterprise credit inquiry request includes: The first service end obtains the basic information and authorization information of the queried enterprise from the credit chain, verifies the consistency of the basic information and the validity of the authorization information, obtains the verification result and uploads it to the credit chain.
8. A credit report generation system, characterized in that: The system includes a first server, a second server and a third server; The first server is used to generate a report pre-assembly request and upload the report pre-assembly request to the credit chain, wherein the report pre-assembly request includes at least one corporate identity of an enterprise; The second server is used to obtain the report pre-assembly request from the credit chain, generate a set of keys for each of the enterprises based on the report pre-assembly request, generate a data preparation request, obtain a first key and a second key from the set of keys, and send the data preparation request, the first key and the second key to the third server; The third server is used to obtain the target data of each of the enterprises according to the data preparation request, encrypt the target data in sequence by using the first key and the second key to obtain encrypted data, upload the encrypted data to the credit investigation chain, and send first status information to the second server; The second server is further configured to send second state information and the second key to the first server based on the first state information; The first server is further configured to obtain the encrypted data from the credit investigation chain, decrypt the encrypted data based on the second key to obtain primary decrypted data, obtain a preset report template, and generate a pre-assembled report based on the primary decrypted data and the preset report template; When receiving a corporate credit inquiry request sent by a user, verify the information of the queried enterprise based on the corporate credit inquiry request, and upload the verification result to the credit inquiry chain; The second server is further configured to obtain the verification result, and when the verification is determined to be successful based on the verification result, send the first key to the first server; The first server is also used to decrypt the first decrypted data based on the first key to obtain the second decrypted data, obtain the pre-assembled report, and generate a credit report based on the second decrypted data and the pre-assembled report.
9. A computer device, characterized in that: It includes a memory and a processor, wherein the memory stores computer-readable instructions, and when the processor executes the computer-readable instructions, the credit report generation method according to any one of claims 1 to 7 is implemented.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer-readable instructions, and when the computer-readable instructions are executed by the processor, the credit report generation method according to any one of claims 1 to 7 is implemented.
Citation Information
Patent Citations
A credit investigation report transfer method based on a block chain and Intel SGX
CN109766712A
Enterprise credit report query method, device and system based on block chain
CN112231366A