Enterprise certification test method, device, equipment and storage medium under test environment

By generating the certification files of the virtual enterprise to conduct enterprise certification testing in the test environment, the problem of limited test data is solved, the testing efficiency and reliability are improved, and the dependence on real data and third-party interfaces is reduced.

CN118295976BActive Publication Date: 2024-09-03BEIJING ZHONGNUO LIANJIE DIGITAL TECH CO LTD
View PDF 6 Cites 0 Cited by

Patent Information

Application Number
CN202410710868.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-06-03
Publication Date
2024-09-03
Estimated Expiration
2044-06-03

AI Technical Summary

Technical Problem

In a testing environment, especially in automated testing and stress testing scenarios, it is difficult to obtain enough real corporate business license photos and legal person ID photos, resulting in limited corporate certification test data and affecting test results.

Method used

By randomly generating the corporate name of the virtual enterprise, and automatically generating the virtual enterprise's business license and legal person ID documents based on the name, the enterprise certification test is conducted in the test environment to avoid reliance on real documents.

Benefits of technology

It realizes enterprise certification testing without real data in the test environment, improves testing efficiency and reliability, reduces dependence on real data, reduces calls to third-party interfaces, and reduces testing costs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118295976B
    Figure CN118295976B
Patent Text Reader

Abstract

The present disclosure provides a method, device, equipment and storage medium for enterprise certification testing in a test environment, the method comprising: randomly generating an enterprise name of a virtual enterprise; generating an authentication file of the virtual enterprise according to the enterprise name; and performing enterprise certification testing on the virtual enterprise in a test environment based on the authentication file; wherein the authentication file comprises at least one of a business license file and a legal person ID card file of the virtual enterprise. The enterprise name of the virtual enterprise can be randomly generated, and the authentication file of the virtual enterprise can be automatically generated according to the randomly generated enterprise name, and then the enterprise certification test in the test environment can be automatically performed based on the authentication file of the virtual enterprise, thereby avoiding dependence on the authentication file of the real enterprise and effectively solving the problem of limited test data.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of software testing technology, and in particular to an enterprise certification testing method, device, equipment and storage medium under a testing environment. Background Art

[0002] 2B software systems for enterprise users usually include the basic function of enterprise authentication. During the research and development process, the enterprise authentication module needs to be strictly tested, usually using manual testing, automated testing, stress testing, etc. to ensure the quality of the software system. At present, when conducting enterprise authentication testing on the enterprise authentication module, it is necessary to find real photos of the business license of the enterprise and the legal person’s ID card, and then call the third-party OCR interface to identify the business license information and the legal person’s ID card information, and continue to call the third-party authentication interface after the information is identified to complete the comparison and authentication of the business license information and the legal person’s ID card information. However, in a test environment, especially in the scenarios of automated testing and stress testing, it is difficult to obtain enough real business license photos and legal person ID card photos for testing. Therefore, the existing enterprise authentication test is limited by the test data and it is difficult to achieve good test results. Therefore, how to solve the problem of limited test data is an urgent problem for technicians in this field. Summary of the invention

[0003] In view of this, the present disclosure proposes an enterprise authentication test method, device, equipment and storage medium in a test environment, which can randomly generate the enterprise name of a virtual enterprise, and automatically generate the authentication file of the virtual enterprise according to the randomly generated enterprise name, and then automatically perform the enterprise authentication test in the test environment based on the authentication file of the virtual enterprise, thereby avoiding dependence on the real enterprise authentication file and effectively solving the problem of limited test data.

[0004] According to a first aspect of the present disclosure, there is provided an enterprise authentication test method in a test environment, comprising:

[0005] Randomly generate the company name of the virtual company;

[0006] Generating a certification document for the virtual enterprise according to the enterprise name;

[0007] Based on the authentication file, performing an enterprise authentication test on the virtual enterprise in a test environment;

[0008] The authentication document includes at least one of a business license document of the virtual enterprise and an identity card document of the legal person.

[0009] In a possible implementation, when generating the business license file of the virtual enterprise according to the enterprise name, the process includes:

[0010] Generate enterprise information corresponding to the enterprise name;

[0011] The enterprise information is filled into a preset business license file template to obtain the business license file of the virtual enterprise.

[0012] In a possible implementation, when generating the legal person ID card file of the virtual enterprise according to the enterprise name, it includes:

[0013] Generate enterprise information corresponding to the enterprise name, wherein the enterprise information includes the name of the legal person;

[0014] Extracting the name of the legal person from the enterprise information and generating identity card information corresponding to the name of the legal person;

[0015] The identity card information is filled into a preset identity card file template to obtain the legal person identity card file of the virtual enterprise.

[0016] In a possible implementation, after the authentication file of the virtual enterprise is generated, the method further includes:

[0017] Acquire the file data recorded in the authentication file, and calculate the file identifier of the authentication file, wherein the file identifier is used to uniquely identify an authentication file;

[0018] The file identifier of the authentication file and the file data of the authentication file are associated and stored in a pre-built virtual enterprise database.

[0019] In a possible implementation, when performing enterprise authentication on the virtual enterprise in a test environment based on the authentication file, the process includes:

[0020] Performing content recognition on the authentication file to obtain file data of the authentication file;

[0021] The file data is authenticated to obtain an authentication result of the virtual enterprise.

[0022] In a possible implementation, when performing content recognition on the authentication file to obtain file data of the authentication file, the process includes:

[0023] Calculating a file identification of the authentication file;

[0024] Based on the file identifier, file data corresponding to the file identifier is extracted from the virtual enterprise database, and the extracted file data is used as file data of the authentication file.

[0025] In a possible implementation, when authenticating the file data to obtain the authentication result of the virtual enterprise, it includes:

[0026] Determining whether the file data is consistent with the data recorded in the virtual enterprise database;

[0027] When it is determined that the file data is consistent with the data recorded in the virtual enterprise database, it is determined that the authentication result of the virtual enterprise is authenticated.

[0028] According to a second aspect of the present disclosure, there is provided an enterprise certification testing device in a testing environment, comprising:

[0029] A data generation module, used for randomly generating the enterprise name of a virtual enterprise;

[0030] A certificate generation module, used to generate a certification document for the virtual enterprise according to the enterprise name;

[0031] An authentication test module, used for performing an enterprise authentication test on the virtual enterprise in a test environment based on the authentication file;

[0032] The authentication document includes at least one of a business license document of the virtual enterprise and an identity card document of the legal person.

[0033] According to a third aspect of the present disclosure, an enterprise certification test device in a test environment is provided, comprising: a processor; a memory for storing processor executable instructions; wherein the processor is configured to execute the method described in the first aspect of the present disclosure.

[0034] According to a fourth aspect of the present disclosure, a non-volatile computer-readable storage medium is provided, on which computer program instructions are stored, wherein the computer program instructions, when executed by a processor, implement the method described in the first aspect of the present disclosure.

[0035] In the present disclosure, a method, device, equipment and storage medium for enterprise certification testing in a test environment are disclosed. The method includes: randomly generating an enterprise name of a virtual enterprise; generating an authentication file of the virtual enterprise according to the enterprise name; and performing an enterprise certification test on the virtual enterprise in a test environment based on the authentication file; wherein the authentication file includes at least one of a business license file and a legal person ID card file of the virtual enterprise. The method disclosed in the present disclosure can randomly generate an enterprise name of a virtual enterprise, and automatically generate an authentication file of the virtual enterprise according to the randomly generated enterprise name, and then perform an enterprise certification test in a test environment based on the authentication file of the virtual enterprise, thereby avoiding dependence on the authentication file of the real enterprise and effectively solving the problem of limited test data.

[0036] Further features and aspects of the present disclosure will become apparent from the following detailed description of exemplary embodiments with reference to the attached drawings. BRIEF DESCRIPTION OF THE DRAWINGS

[0037] The accompanying drawings, which are incorporated in and constitute a part of the specification, illustrate exemplary embodiments, features, and aspects of the disclosure and, together with the description, serve to explain the principles of the disclosure.

[0038] Figure 1 A flowchart of an enterprise authentication testing method in a testing environment according to an embodiment of the present disclosure is shown.

[0039] Figure 2 A flowchart of an enterprise authentication test method in a configuration phase according to an embodiment of the present disclosure is shown.

[0040] Figure 3 A flow chart of an enterprise authentication test method in the OCR recognition phase according to an embodiment of the present disclosure is shown.

[0041] Figure 4 A flow chart of an enterprise authentication test method in the authentication phase according to an embodiment of the present disclosure is shown.

[0042] Figure 5 A schematic block diagram of an enterprise certification test device in a test environment according to an embodiment of the present disclosure is shown.

[0043] Figure 6 A schematic block diagram of an enterprise certification test device in a test environment according to an embodiment of the present disclosure is shown. DETAILED DESCRIPTION

[0044] Various exemplary embodiments, features and aspects of the present disclosure will be described in detail below with reference to the accompanying drawings. The same reference numerals in the accompanying drawings represent elements with the same or similar functions. Although various aspects of the embodiments are shown in the accompanying drawings, the drawings are not necessarily drawn to scale unless otherwise specified.

[0045] The word “exemplary” is used exclusively herein to mean “serving as an example, example, or illustration.” Any embodiment described herein as “exemplary” is not necessarily to be construed as preferred or advantageous over other embodiments.

[0046] In addition, in order to better illustrate the present disclosure, numerous specific details are given in the following specific embodiments. It should be understood by those skilled in the art that the present disclosure can also be implemented without certain specific details. In some examples, methods, means, components and circuits well known to those skilled in the art are not described in detail in order to highlight the subject matter of the present disclosure.

[0047] <Method Example>

[0048] Figure 1 A flow chart of an enterprise certification test method in a test environment according to an embodiment of the present disclosure is shown. The enterprise certification test method is implemented by a baffle service system, such as Figure 1As shown, the method includes steps S1100-S1300.

[0049] S1100, randomly generate the enterprise name of the virtual enterprise. Specifically, the enterprise name of the virtual enterprise can be randomly generated according to the enterprise name generation rule of "region name + enterprise proprietary name + enterprise type identifier".

[0050] It should be noted here that before randomly generating the company name of a virtual enterprise, it is necessary to first build a local database, which presets all the company types, business scope types, registered capital value ranges, earliest establishment dates, latest closing dates of business terms, administrative division codes of various provinces, cities and districts, names and detailed address data, surnames of hundreds of surnames, and preset 10,000+ names of existing enterprises. In this way, the company name of the virtual enterprise and the company information corresponding to the company name can be randomly generated based on the pre-built local database. Among them, the company type includes at least one of a limited company, a partnership, a joint stock company, a limited liability company, and an unlimited company.

[0051] When randomly generating the enterprise name of a virtual enterprise based on a local database, the following steps may be included: first, randomly extract a region name from the names of provinces, cities and districts stored in the local database as a prefix; second, randomly generate 4 to 10 Chinese characters as the enterprise proprietary name; finally, randomly extract an enterprise type from the enterprise types stored in the local database as a suffix. For example, if the randomly extracted region name is Beijing, the randomly generated enterprise proprietary name is xxxx, and the randomly extracted enterprise type is a limited company, then the enterprise name of the randomly generated virtual enterprise is Beijing xxxx Limited Company.

[0052] After randomly generating the company name of the virtual enterprise, step S1200 can be executed to generate a certification file of the virtual enterprise according to the company name, wherein the certification file includes at least one of the business license file of the virtual enterprise and the identity card file of the legal person.

[0053] In the case where the authentication document includes the business license document of a virtual enterprise, it is necessary to generate the business license document of the virtual enterprise based on the enterprise name, which may specifically include the following steps:

[0054] First, generate the enterprise information corresponding to the enterprise name. The enterprise information is all the enterprise information required to construct a business license, which may include: enterprise name, enterprise type, legal representative, business scope, registered capital, establishment date, business term, registered address, unified social information code, etc. The enterprise name in the enterprise information is the enterprise name of the virtual enterprise obtained.

[0055] In a possible implementation, when the enterprise information corresponding to the enterprise name is generated, it is implemented based on a pre-built local database.

[0056] Specifically, when generating the enterprise type corresponding to the enterprise name based on the local database, the following steps may be included: first, the enterprise name is segmented to obtain multiple segmentation results. Then, each segmentation result is traversed, and for the current segmentation result traversed, the similarity between the current segmentation result and the enterprise types recorded in the local database is calculated, and the enterprise types with a similarity greater than the set first similarity threshold are screened out as the target enterprise type of the current segmentation result. After the traversal is completed, the target enterprise type corresponding to each segmentation result is obtained, and the target enterprise type corresponding to each segmentation result is used as the target enterprise type data set. Finally, a company type is randomly extracted from the target enterprise type data set as the company type corresponding to the company name. For example, the company name of the virtual enterprise output by the user is xxxx Co., Ltd., and the company types included in the target enterprise type data set obtained by referring to the above steps are: limited liability company, other limited liability company, and limited liability company (sole proprietorship of a natural person), then a company type is randomly extracted from limited liability company, other limited liability company and limited liability company (sole proprietorship of a natural person), for example, if the randomly extracted company type is a limited liability company, the limited liability company is used as the company type corresponding to the company name of the virtual enterprise.

[0057] When generating the legal representative corresponding to the enterprise name based on the local database, the following steps may be included: first, randomly select a surname from all the surnames recorded in the local database, and randomly select a first name from all the first names, and combine the randomly selected surname and first name to obtain the legal representative corresponding to the enterprise name of the virtual enterprise.

[0058] When generating the business scope corresponding to the enterprise name based on the local database, the following steps may be included: First, the enterprise name is segmented to obtain multiple segmentation results. Then, each segmentation result is traversed, and for the current segmentation result traversed, the similarity between the current segmentation result and each business scope type recorded in the local database is calculated, and the business scope type with a similarity greater than the set second similarity threshold is screened out as the target business scope type of the current segmentation result. After the traversal is completed, the target business scope type corresponding to each segmentation result is obtained, and the target business scope type corresponding to each segmentation result is used as the target business scope type data set. Finally, the business scope corresponding to the enterprise name of the virtual enterprise is determined according to the target business scope type data set. For example, the enterprise name of the virtual enterprise output by the user is xxx Technology Co., Ltd., and the target business scope types included in the target business scope type data set obtained with reference to the above steps include computer, communication and other electronic equipment manufacturing industry, and professional technical service industry. The business scope corresponding to the enterprise name of the determined virtual enterprise is computer, communication and other electronic equipment manufacturing industry, and professional technical service industry.

[0059] When generating the registered capital corresponding to the enterprise name based on the local database, an integer value can be randomly selected from the value range of the registered capital recorded in the local database as the registered capital corresponding to the enterprise name of the virtual enterprise.

[0060] When generating the establishment date corresponding to the enterprise name based on the local database, the following steps may be included: reading the earliest establishment date and the current date recorded in the local database, and randomly generating a date between the earliest establishment date and the current date, which is the establishment date corresponding to the enterprise name of the virtual enterprise.

[0061] When generating the business term corresponding to the enterprise name based on the local database, the following steps may be included: reading the establishment date corresponding to the enterprise name generated above and the latest expiration date of the business term recorded in the local database, taking the establishment date corresponding to the enterprise name as the start date of the business term, and randomly selecting a date between the establishment date and the latest expiration date of the business term as the end date of the business term. Then, based on the start date and end date of the business term, the business term corresponding to the enterprise name of the virtual enterprise is generated.

[0062] When generating a registered address corresponding to a corporate name based on a local database, the following steps may be included: randomly selecting from the names and detailed address data of each province, city, and district recorded in the local database, obtaining a detailed address data and using it as the registered address corresponding to the corporate name of the virtual enterprise.

[0063] When generating a unified social information code corresponding to the enterprise name based on the local database, the following steps may be included: read the registration address generated above, find the administrative division code corresponding to the registration address, obtain the code corresponding to the registration address based on the obtained administrative division code, and use the code corresponding to the registration address as the first six characters of the unified social information code. Collect a three-digit number as the registration management department code using a random algorithm, and use the three-digit number as the seventh to ninth digits of the unified social information code. Collect an eight-digit number using a random algorithm, and use the eight-digit number as the tenth to seventeenth digits of the unified social information code. Collect a single-digit number as the eighteenth digit of the unified social information code using a random algorithm, and based on the eighteenth digit, use a character algorithm to generate the last check code in the unified social information code, so that the unified social information code corresponding to the enterprise name of the virtual enterprise can be obtained.

[0064] Second, fill the enterprise information into the preset business license file template to obtain the business license file of the virtual enterprise. It should be noted here that the business license file template is pre-stored in the baffle service system. In this way, after generating the enterprise information corresponding to the enterprise name, the enterprise information can be filled into the corresponding position of the business license file template to obtain the business license file of the virtual enterprise. Among them, the business license file can be in image format or PDF format, which is not specifically limited here.

[0065] In the case where the authentication document includes the legal person ID document of a virtual enterprise, it is necessary to generate the legal person ID document of the virtual enterprise according to the enterprise name, which may specifically include the following steps:

[0066] First, generate the enterprise information corresponding to the enterprise name. The specific steps are as mentioned above and will not be repeated here.

[0067] Second, extract the name of the legal person from the enterprise information and generate the ID card information corresponding to the legal person name. Specifically, as mentioned above, the generated enterprise information includes the name of the legal representative (legal person name). Therefore, after generating the enterprise information, the legal person name can be extracted from the enterprise information, and the extracted legal person name can be used as the name in the ID card information. After extracting the legal person name, the ID card information corresponding to the legal person name can be generated. Among them, the ID card information includes name, gender, nationality, date of birth, address, ID card number, issuing authority and validity period.

[0068] It should be noted here that, in the case where the authentication document includes the legal person ID card document of a virtual enterprise, the local database should also preset a mapping table of all ethnic names, all area codes that may be involved in the first six digits of the ID card and the corresponding issuing authorities, the range of birth dates, the sequence code range (000-999), and the remainder and the check code.

[0069] When generating the ID card information corresponding to the legal person's name, it can be implemented based on a pre-built local database.

[0070] Specifically, when generating the ID card number corresponding to the name of the legal person based on the local database, the method includes: randomly extracting a region code from all region codes recorded in the local database as the first six digits of the ID card number. Randomly generating a date of birth within the range of the date of birth recorded in the local database as the middle eight digits of the ID card number. Randomly generating a three-digit number within the range of the sequence code recorded in the local database as the fifteenth to seventeenth digits of the ID card number. Generating the last check code of the ID card number according to the check code generation rule. The check code generation rule is: defining a fixed weight coefficient list, such as [1, 9, 8, 7, 6, 5, 4, 3, 2, 1, 1]. This weight coefficient list is used to perform weighted summation on the first 17 digits of the ID card number. Using the weights in the weight coefficient table, perform weighted summation on the first 17 digits of the generated ID card number and divide by 11 to obtain a remainder, and searching the check code corresponding to the remainder in the mapping relationship table between the remainder and the check code as the last check code of the ID card number.

[0071] When generating the date of birth corresponding to the legal person's name, the following steps may be included: reading the ID number generated above, extracting the seventh to fourteenth digits of the ID number, and generating the date of birth corresponding to the legal person's name based on the extracted seventh to fourteenth digits.

[0072] When generating the gender corresponding to the legal person's name, male or female may be randomly selected as the gender corresponding to the legal person's name.

[0073] When generating the ethnic group corresponding to the legal person's name, the following steps may be included: selecting an ethnic group name from all ethnic group names recorded in the local database as the ethnic group corresponding to the legal person's name.

[0074] When generating the address corresponding to the legal person's name in the local database, you can refer to the registered address generation process mentioned above, which will not be repeated here.

[0075] When generating the issuing authority corresponding to the legal person's name based on the local database, the following steps can be included: reading the ID number generated above and extracting the first six digits of the ID number, and obtaining the issuing authority that matches the first six digits of the ID number by querying the local database, which is the issuing authority corresponding to the legal person's name.

[0076] When generating the validity period corresponding to the legal person's name, the following steps may be included: read the birth date corresponding to the legal person's name generated above, add 15 years to the birth date and compare it with the current time. If it is less than the current time, randomly select a date between the birth date and the current time as the start time of the validity period. If it is greater than the current time, take the year before the current time as the start time of the validity period. Add 25 years to the start time to get the end time of the validity period.

[0077] Third, fill the ID card information into the preset ID card file template to obtain the legal person ID card file of the virtual enterprise. It should be noted here that the ID card file template is pre-stored in the baffle service system. In this way, after generating the ID card information corresponding to the legal person name, the ID card information corresponding to the legal person name can be filled into the corresponding position of the ID card file template to obtain the legal person ID card file of the virtual enterprise. Among them, the legal person ID card file can be in image format or PDF format, which is not specifically limited here.

[0078] It should be noted here that, in order to facilitate the subsequent enterprise authentication in the test environment based on the generated authentication file of the virtual enterprise, in a possible implementation, after the authentication file of the virtual enterprise is generated, the following steps are further included:

[0079] First, the file data recorded in the authentication file is obtained, and the file identifier of the authentication file is calculated, where the file identifier is used to uniquely identify a authentication file. Specifically, in the process of generating the authentication file, the file data used to generate the authentication file will be recorded, so that the file data recorded in the authentication file can be obtained in this step. Furthermore, after the authentication file is generated, the file identifier of the authentication file will be calculated using a preset algorithm. For example, the Base64 encoding of the authentication file can be calculated, and the calculated Base64 encoding is used as the file identifier of the authentication file.

[0080] For example, in an embodiment where the authentication file includes a business license file, in the process of generating the business license file, corporate information corresponding to the corporate name will be generated (see above for details). The corporate information corresponding to the corporate name is the file data used to generate the business license file, and the file data used for the business license file will be recorded. At the same time, after the business license file is generated, the Base64 encoding of the business license file will be calculated, and the Base64 encoding will be used as the file identifier of the business license file.

[0081] For another example, in an embodiment where the authentication file includes a legal person's ID card document, in the process of generating the legal person's ID card document, ID card information corresponding to the legal person's name will be generated (see above for details). The ID card information corresponding to the legal person's name is the file data used to generate the legal person's ID card document, and the file data used for the legal person's ID card document will be recorded. At the same time, after the legal person's ID card document is generated, the Base64 code of the legal person's ID card document will be calculated, and the Base64 code will be used as the file identifier of the legal person's ID card document.

[0082] Second, the file identifier of the authentication file and the file data of the authentication file are associated and stored in a pre-built virtual enterprise database. When the authentication file includes a business license file, the virtual enterprise database will include a virtual enterprise business license data structure table, and when the authentication file includes a legal person ID card file, the virtual enterprise database will include a virtual legal person data structure table.

[0083] Specifically, in an embodiment where the authentication file includes a business license file, the file data used to generate the business license file and the Base64 encoding of the business license file are associated and stored in a virtual enterprise business license data structure table in a pre-built virtual enterprise database.

[0084] In the embodiment where the authentication file includes the legal person ID card file, the file data used to generate the legal person ID card file and the Base64 encoding of the legal person ID card file are associated and stored in the virtual legal person data structure table in the pre-built virtual enterprise database.

[0085] That is to say, every time a legal person ID card file of a virtual enterprise is generated, the file data corresponding to the legal person ID card file of the virtual enterprise and the Base64 code will be stored in the pre-built virtual enterprise business license data structure table. Similarly, every time a business license file of a virtual enterprise is generated, the file data corresponding to the business license file of the virtual enterprise and the Base64 code will be stored in the pre-built virtual legal person data structure table.

[0086] In this way, enterprise authentication in a test environment can be performed later based on the data stored in the virtual enterprise database.

[0087] S1300: Based on the authentication file, the virtual enterprise is authenticated in the test environment. Specifically, the following steps may be included:

[0088] First, the content of the authentication file is identified to obtain the file data of the authentication file.

[0089] Specifically, in an embodiment in which a virtual enterprise database is constructed, when performing content recognition on an authentication file to obtain file data of the authentication file, the following steps may be included: calculating a file identifier of the authentication file, the calculation method of the file identifier is as described above and will not be repeated here. Based on the file identifier, extracting file data corresponding to the file identifier from the virtual enterprise database, and using the extracted file data as the file data of the authentication file.

[0090] Second, authenticate the file data and obtain the authentication result of the virtual enterprise.

[0091] Specifically, in an embodiment in which a virtual enterprise database is constructed, when authenticating file data and obtaining the authentication result of the virtual enterprise, the following steps may be included: determining whether the file data is consistent with the data recorded in the virtual enterprise database; and secondly, when it is determined that the file data is consistent with the data recorded in the virtual enterprise database, determining that the authentication result of the virtual enterprise is authenticated.

[0092] The present disclosure provides a method for testing enterprise certification in a test environment, including: generating a random virtual enterprise enterprise name; generating a certification file of the virtual enterprise according to the enterprise name; and performing enterprise certification testing on the virtual enterprise in the test environment based on the certification file; wherein the certification file includes at least one of the business license file and the legal person ID card file of the virtual enterprise. The method disclosed in the present disclosure can randomly generate an enterprise name of a virtual enterprise, and automatically generate a certification file of the virtual enterprise according to the randomly generated enterprise name, and then automatically perform enterprise certification testing in the test environment based on the certification file of the virtual enterprise, thereby avoiding dependence on the real enterprise certification file and effectively solving the problem of limited test data.

[0093] It should be noted here that in the scenarios of automated testing and stress testing, it is necessary to randomly generate the corporate names of multiple virtual enterprises, and generate authentication files for each virtual enterprise based on the names of each virtual enterprise. Finally, based on the authentication files of all generated virtual enterprises, automated testing and stress testing of enterprise authentication tests are performed.

[0094] When randomly generating corporate names of multiple virtual enterprises, it is necessary to set the number of virtual enterprises required for automatic testing and stress testing. When the number of virtual enterprises is set, the corporate names of multiple virtual enterprises of the set number will be randomly generated in sequence with reference to the method of step S1100.

[0095] After generating the enterprise names of multiple virtual enterprises, traverse each enterprise name, and for each traversed enterprise name, refer to step S1200 to step S1300 to generate the authentication file of the virtual enterprise, and perform enterprise authentication test on the virtual enterprise in the test environment based on the generated authentication file. In this way, after the traversal is completed, the automatic test and stress test experiments can be automatically completed. The method of this embodiment can automatically complete the automatic test and stress test, thereby ensuring that the enterprise authentication test process is more efficient and reliable, thereby improving the quality of 2B enterprise software system research and development.

[0096] The following will be combined Figure 2 , Figure 3 as well as Figure 4 The enterprise authentication test method under the test environment of the present disclosure is described again. The enterprise authentication test method is specifically divided into three stages, namely, a configuration stage, an OCR recognition stage, and an authentication stage.

[0097] The operations performed during the configuration phase are as follows: Figure 2 As shown, specifically including:

[0098] S2111, the user enters the number n of virtual enterprises to be generated and clicks the OK control.

[0099] S2112, according to the number n of virtual enterprises that the user wants to generate, the automated testing tool end of the baffle service system initializes the loop index i to 0, prepares to execute the operations of S2112 to S2124 in a loop, and generates n virtual enterprise files in sequence.

[0100] S2113, randomly generate the i-th virtual enterprise name on the automated testing tool side of the baffle service system.

[0101] S2114, after obtaining the generated enterprise name, the automated testing tool end of the baffle service system generates a first HTTP request including the enterprise name, and sends the first HTTP request to the baffle service system.

[0102] S2115, after receiving the first HTTP request, the baffle service system parses the first HTTP request to obtain the enterprise name input by the user, and generates enterprise information corresponding to the enterprise name.

[0103] S2116, the baffle service system extracts the name of the legal person in the enterprise information and generates the ID card information corresponding to the legal person name (i.e. Figure 2 (information on legal persons in the ).

[0104] S2117, the baffle service system fills the enterprise information corresponding to the enterprise name into the business license file template to obtain the business license file of the virtual enterprise.

[0105] S2118, the baffle service system fills the identity card information corresponding to the legal person's name into the identity card file template to obtain the legal person identity card file of the virtual enterprise.

[0106] S2119, the baffle service system calculates the base64 codes of the business license file and the legal person ID card file respectively, and records the base64 code of the business license file in the virtual enterprise business license data structure table in the virtual enterprise database after associating it with the file data for generating the business license file, and records the base64 code of the legal person ID card file in the virtual legal person data structure table in the virtual enterprise database after associating it with the file data for generating the legal person ID card file.

[0107] S2120, the baffle service system compresses the generated business license file and legal person ID card file of the virtual enterprise to obtain a file compression package.

[0108] S2121, the baffle service system generates a second HTTP request including a file compression package, and sends the second HTTP request to the file service system.

[0109] S2122, after receiving the second HTTP request, the file service system parses the second HTTP request to obtain a file compression package, stores the file compression package, and records the storage address of the file compression package.

[0110] S2123, the file service system generates a third HTTP request including the storage address of the file compression package, and sends the third HTTP request to the baffle service system.

[0111] S2124, the baffle service system parses the storage address of the file compression package from the third HTTP request and performs information storage processing.

[0112] S2125, the baffle service system returns the download address link of the file compression package to the automated testing tool end of the baffle service system.

[0113] S2126, loop index i+1, prepare for the next loop to generate the i+1th virtual enterprise name.

[0114] S2127, after looping through S2113 to S2126 for n times and generating n virtual enterprise files, generates a log file for this operation to record the name of the enterprise generated this time and the corresponding file download address.

[0115] S2128, the user can use the download address link in the log file to download the file compression package corresponding to the company names of the generated multiple virtual enterprises, and decompress the business license file and the legal person ID card file of the virtual enterprise from the file compression package.

[0116] After the user downloads the business license file and the legal person ID card file of the virtual enterprise, the OCR recognition stage can be performed. The operation steps of the OCR recognition stage are as follows: Figure 3 As shown, specifically including:

[0117] S2211, the user uploads the authentication file of the virtual enterprise in the business system to be tested and clicks the content identification control, wherein the authentication file includes the business license file and the legal person ID card file of the virtual enterprise.

[0118] S2212: When the business system detects that the content recognition control is triggered, it generates a fourth HTTP request including the authentication file of the virtual enterprise and sends the fourth HTTP request to the SDK gateway.

[0119] S2213, after receiving the fourth HTTP request, the SDK gateway parses the authentication file of the virtual enterprise from the fourth HTTP request, reads the current configuration data in the current SDK gateway, and when the current configuration data is for testing, sends the parsed authentication file to the baffle service system; when the current configuration data is for actual operation, sends the parsed authentication file to the third-party OCR Baidu recognition service for content recognition of the authentication file.

[0120] S2214, after receiving the authentication file of the virtual enterprise, the baffle service system calculates the base64 encoding of the authentication file.

[0121] S2215, the baffle service system searches the virtual enterprise database for file data associated with the base64 code based on the calculated base64 code of the authentication file.

[0122] S2216, using the file data associated with the base64 encoding returned by the query as the file data of the authentication file.

[0123] S2217, the baffle service system returns the file data of the authentication file to the SDK gateway.

[0124] S2218, the SDK gateway returns the file data of the authentication file to the business system.

[0125] S2219, the business system receives the file data of the authentication file, and pushes and displays the file data of the authentication file.

[0126] That is to say, in this embodiment, there is no need to call a third-party OCR interface to perform file data recognition of the authentication document, thereby reducing the cost of performing file data recognition.

[0127] After the file data in the certificate file is identified, the authentication phase can be performed. The authentication phase operation steps are as follows: Figure 4 As shown, specifically including:

[0128] S2311, after the file data of the authentication file is pushed and displayed in the business system, the user can click the authentication control, and the business system will read the file data of the authentication file and submit it when detecting that the authentication control is triggered.

[0129] S2312, generate a fifth HTTP request including file data of the authentication file, and send the fifth HTTP request to the SDK gateway.

[0130] S2313, after receiving the fifth HTTP request, the SDK gateway parses the file data of the authentication file from the fifth HTTP request, reads the current configuration data in the current SDK gateway, and when the current configuration data is for testing, sends the parsed file data of the authentication file to the baffle service system; when the current configuration data is for actual operation, sends the parsed file data to the Sanfang Tianyancha enterprise authentication service and the Sanfang eSignbao personal two-factor authentication service for processing.

[0131] S2314, after receiving the file data of the authentication file, the baffle service system compares the file data of the authentication file with the file data in the virtual enterprise database.

[0132] S2315, when there is consistent file data, determine that the enterprise authentication is passed, otherwise determine that the enterprise authentication is not passed.

[0133] S2316, the baffle service system sends the enterprise authentication result to the SDK gateway.

[0134] S2317, the SDK gateway sends the enterprise authentication result to the business system.

[0135] S2318: After receiving the enterprise authentication result, the business system will push and display the enterprise authentication result to the user.

[0136] That is to say, in this embodiment, there is no need to call a third-party authentication interface to perform enterprise authentication, thereby reducing the cost of enterprise authentication.

[0137] When doing business on the enterprise side, the first thing the enterprise needs to do is to authenticate the enterprise and the legal person. Only after the enterprise and the legal person are authenticated can the subsequent business be operated. In a non-production environment, a lot of testing is required. In a test environment, it is difficult to obtain a real business license for OCR recognition and authentication of the enterprise and the legal person. Therefore, this set of virtual enterprise and virtual legal person information verification baffle system was developed. Without calling the third-party interface, the baffle management system can generate virtual enterprise and virtual legal person certificate information for OCR recognition and verification, which greatly improves the progress of the test and greatly reduces the cost of calling the third-party interface.

[0138] <Device Example>

[0139] Figure 5 FIG. 1 is a schematic block diagram of an enterprise certification test device in a test environment according to an embodiment of the present disclosure. Figure 5 As shown, the enterprise certification test device 100 in the test environment includes:

[0140] The data generation module 110 is used to randomly generate the enterprise name of the virtual enterprise;

[0141] The certificate generation module 120 is used to generate a certification document of a virtual enterprise according to the enterprise name;

[0142] The certification test module is used to perform enterprise certification test on the virtual enterprise in the test environment based on the certification file;

[0143] The authentication document includes at least one of a business license document of the virtual enterprise and an identity card document of the legal person.

[0144] <Equipment Embodiment>

[0145] Figure 6 FIG. 1 is a schematic block diagram of an enterprise certification test device in a test environment according to an embodiment of the present disclosure. Figure 6 As shown, the enterprise certification test device 200 under the test environment includes: a processor 210 and a memory 220 for storing executable instructions of the processor 210. The processor 210 is configured to implement any of the above-mentioned enterprise certification test methods under the test environment when executing the executable instructions.

[0146] Here, it should be noted that the number of processors 210 may be one or more. At the same time, the enterprise certification test device 200 under the test environment of the embodiment of the present disclosure may also include an input device 230 and an output device 240. The processor 210, the memory 220, the input device 230, and the output device 240 may be connected via a bus or in other ways, which are not specifically limited here.

[0147] The memory 220 is a computer-readable storage medium that can be used to store software programs, computer executable programs, and various modules, such as the program or module corresponding to the enterprise certification test method under the test environment of the embodiment of the present disclosure. The processor 210 executes various functional applications and data processing of the enterprise certification test device 200 under the test environment by running the software program or module stored in the memory 220.

[0148] The input device 230 may be used to receive input numbers or signals. The signals may be key signals related to user settings and function control of the device / terminal / server. The output device 240 may include display devices such as display screens.

[0149] <Storage Medium Embodiment>

[0150] According to a fourth aspect of the present disclosure, a non-volatile computer-readable storage medium is also provided, on which computer program instructions are stored. When the computer program instructions are executed by the processor 210, the enterprise certification test method in any of the test environments described above is implemented.

[0151] The embodiments of the present disclosure have been described above, and the above description is exemplary, not exhaustive, and is not limited to the disclosed embodiments. Many modifications and variations will be apparent to those of ordinary skill in the art without departing from the scope and spirit of the described embodiments. The selection of terms used herein is intended to best explain the principles of the embodiments, practical applications, or technical improvements to the technology in the market, or to enable other persons of ordinary skill in the art to understand the embodiments disclosed herein.

Claims

1. A method for testing enterprise certification in a testing environment, characterized in that: include: Randomly generate the company name of the virtual company; Generating a certification document for the virtual enterprise according to the enterprise name; Based on the authentication file, performing an enterprise authentication test on the virtual enterprise in a test environment; Wherein, the authentication document includes at least one of the business license document of the virtual enterprise and the identity card document of the legal person; When generating the authentication file of the virtual enterprise according to the enterprise name, the file data used in generating the authentication file will be recorded, and the file data used in generating the authentication file is the file data recorded in the authentication file; After generating the authentication file of the virtual enterprise, the method further includes: Acquire the file data recorded in the authentication file, and calculate the file identifier of the authentication file, wherein the file identifier is used to uniquely identify an authentication file; storing the file identifier of the authentication file and the file data of the authentication file in association with each other in a pre-built virtual enterprise database; When performing enterprise authentication in a test environment on the virtual enterprise based on the authentication file, the method includes: Performing content recognition on the authentication file to obtain file data of the authentication file, specifically, calculating a file identifier of the authentication file; based on the file identifier, extracting file data corresponding to the file identifier from the virtual enterprise database, and using the extracted file data as the file data of the authentication file; The file data is authenticated to obtain an authentication result of the virtual enterprise.

2. The method according to claim 1, characterized in that When generating the business license file of the virtual enterprise according to the enterprise name, it includes: Generate enterprise information corresponding to the enterprise name; The enterprise information is filled into a preset business license file template to obtain the business license file of the virtual enterprise.

3. The method according to claim 1, characterized in that When generating the legal person ID card file of the virtual enterprise according to the enterprise name, it includes: Generate enterprise information corresponding to the enterprise name, wherein the enterprise information includes the name of the legal person; Extracting the name of the legal person from the enterprise information and generating identity card information corresponding to the name of the legal person; The identity card information is filled into a preset identity card file template to obtain the legal person identity card file of the virtual enterprise.

4. The method according to claim 1, characterized in that: When the file data is authenticated to obtain the authentication result of the virtual enterprise, it includes: Determining whether the file data is consistent with the data recorded in the virtual enterprise database; When it is determined that the file data is consistent with the data recorded in the virtual enterprise database, it is determined that the authentication result of the virtual enterprise is authenticated.

5. An enterprise certification test device in a test environment, characterized in that: A data generation module, used for randomly generating the enterprise name of a virtual enterprise; A certificate generation module, used to generate a certification document for the virtual enterprise according to the enterprise name; An authentication test module, used for performing an enterprise authentication test on the virtual enterprise in a test environment based on the authentication file; Wherein, the authentication document includes at least one of the business license document of the virtual enterprise and the identity card document of the legal person; The certificate generation module, when generating the authentication file of the virtual enterprise according to the enterprise name, records the file data used in generating the authentication file, and the file data used in generating the authentication file is the file data recorded in the authentication file; After generating the authentication file of the virtual enterprise, the certificate generation module is further used to: Acquire the file data recorded in the authentication file, and calculate the file identifier of the authentication file, wherein the file identifier is used to uniquely identify an authentication file; storing the file identifier of the authentication file and the file data of the authentication file in association with each other in a pre-built virtual enterprise database; The authentication test module, when performing enterprise authentication on the virtual enterprise in a test environment based on the authentication file, is specifically used to: Performing content recognition on the authentication file to obtain file data of the authentication file, specifically, calculating a file identifier of the authentication file; based on the file identifier, extracting file data corresponding to the file identifier from the virtual enterprise database, and using the extracted file data as the file data of the authentication file; The file data is authenticated to obtain an authentication result of the virtual enterprise.

6. An enterprise certification test device in a test environment, characterized in that: include: processor; a memory for storing processor-executable instructions; Wherein, the processor is configured to implement the method described in any one of claims 1 to 4 when executing the executable instructions.

7. A non-volatile computer-readable storage medium having computer program instructions stored thereon, characterized in that: When the computer program instructions are executed by a processor, the method according to any one of claims 1 to 4 is implemented.

Citation Information

Patent Citations

  • Identity authentication platform test method and device, equipment and storage medium

    CN113938886A

  • Data generation method and device, electronic equipment, and storage medium

    CN113986747A

  • Test method and test system thereof, electronic equipment and computer readable storage medium

    CN114978759A

  • Bid invitation review method, system and device

    CN115170257A

  • Virtual electronic identity card generation method and system

    CN116756002A