Identification Code Uploading Method, Device and Electronic Device
By storing the identification code on the terminal device and sending a supplementary transmission request, the problem of interruption of the identification code upload in the prior art is solved, and the complete and non-repetitive upload of the identification code is achieved, and the upload efficiency and disaster recovery capabilities are improved.
Patent Information
- Application Number
- CN202310240669.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-03-01
- Publication Date
- 2025-07-01
- Estimated Expiration
- 2043-03-01
AI Technical Summary
When uploading the identification code to the server, the upload is easily interrupted due to network or software crashes, resulting in the identification code being unable to be fully uploaded without repeated, which affects efficiency.
By obtaining a table file with multiple identification codes stored on the terminal device, storing it in the database, and sending a retransmission request when communication with the server is disconnected, ensuring that the identification code is complete and uploaded without repeated.
The complete and non-repeated upload of the identification code is achieved, the upload efficiency is improved, and the disaster recovery capability for network abnormalities is enhanced.
Smart Images

Figure CN116319750B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of communication technologies, and particularly to a method, apparatus, and electronic device for uploading identification codes. Background Art
[0002] UUID (Universally Unique Identifier) is a unique parameter obtained through an algorithm and is used as the unique identifier for hardware devices to connect to the network. Service providers that provide UUIDs generally save UUIDs in Excel and then send them to customers. The customer company needs to use additional developed software to assist in uploading them to its own company's server for storage, and write the UUID into the device during the device production process.
[0003] Generally speaking, the software logic for uploading UUIDs to the server is usually that the local PC software first parses and saves the UUIDs in the software's memory, and then directly uploads each UUID to the server software for storage in the database one by one. Once the server software or the local PC software crashes during the upload, or even causes the software to flash back, the computer system to automatically shut down, or the network to be disconnected and other abnormal situations occur, the local PC software has no upload record. If uploading to the server again, it can only be uploaded again, which is very time-consuming and affects the upload efficiency. Summary of the Invention
[0004] The purpose of the present invention is to provide a method, apparatus, and electronic device for uploading identification codes to ensure that the identification codes are uploaded to the server completely and without repetition, and improve the efficiency of uploading the identification codes to the server.
[0005] A method for uploading identification codes provided by the present invention is applied to a terminal device, and the terminal device is communicatively connected to a server. The method includes:
[0006] Obtain a table file storing multiple identification codes;
[0007] Store the multiple identification codes in the table file into a first database, and send an upload request to the server to upload the multiple identification codes to the server; wherein, in the first database, each successfully uploaded identification code is configured with a specified identifier indicating successful upload;
[0008] During the upload process, when the communication between the terminal device and the server is disconnected and then reconnected, send a supplementary upload request to the server to continue uploading the identification codes in the first database that are not configured with the specified identifier to the server.
[0009] Further, the step of storing the multiple identification codes in the table file into the first database includes:
[0010] Judge whether the table file meets the preset format requirements;
[0011] If the table file meets the preset format requirements, store multiple identification codes in the table file into the first database.
[0012] Further, the step of sending an upload request to the server to upload multiple identification codes to the server includes:
[0013] Determine whether the number of identification codes in the table file is greater than a preset threshold;
[0014] If the number of identification codes in the table file is greater than the preset threshold, divide the multiple identification codes into multiple data groups based on the preset threshold; wherein, the number of identification codes in each data group is less than or equal to the preset threshold;
[0015] Send an upload request to the server to upload the multiple data groups to the server in sequence; wherein, in the first database, the identification codes in each successfully uploaded data group are configured with a specified identifier indicating successful upload.
[0016] Further, the step of sending an upload request to the server to upload the multiple data groups to the server in sequence includes:
[0017] Take the first data group as the current data group, and send an upload request to the server to upload the current data group to the server;
[0018] Determine whether an upload success indication is received from the server within a first preset time;
[0019] If an upload success indication is received from the server, add a specified identifier to each identification code corresponding to the current data group in the first database;
[0020] If an upload success indication is not received from the server, determine whether the terminal device is disconnected from the server;
[0021] If the terminal device is not disconnected from the server and a command to continue uploading the current data group to the server is received, repeat the step of sending an upload request to the server to upload the current data group to the server until a specified identifier is added to each identification code corresponding to the current data group in the first database;
[0022] If there is a next data group for the current data group, take the next data group as the new current data group, and repeat the step of sending an upload request to the server to upload the current data group to the server until all the multiple data groups are uploaded to the server.
[0023] Further, the method further includes:
[0024] If the number of identification codes in the table file is not greater than a preset threshold, send an upload request to the server to upload all the identification codes in the table file to the server at one time; wherein, in the first database, each successfully uploaded identification code is configured with a specified identifier indicating successful upload.
[0025] Determine whether an upload success indication is received from the server within a first preset time.
[0026] If an upload success indication is not received from the server and an instruction to re-upload all the identification codes in the table file to the server is received, repeat the step of sending an upload request to the server to upload all the identification codes in the table file to the server until a specified identifier is added to each identification code in the first database.
[0027] An identification code upload method provided by the present invention is applied to a server, and the server is communicatively connected to a terminal device. The method includes:
[0028] If an upload request is received from the terminal device, receive the multiple identification codes carried in the upload request and sequentially store the multiple identification codes in a second database.
[0029] If there is an identification code in the second database that is the same as at least one of the multiple identification codes, delete the uploaded identification codes corresponding to the upload request and send an upload failure indication to the terminal device.
[0030] If the identification codes in the second database are not repeated with each of the multiple identification codes, send an upload success indication to the terminal device.
[0031] If a re-upload request is received from the terminal device, receive the identification codes that are not configured with a specified identifier indicating successful upload carried in the re-upload request.
[0032] For each identification code that is not configured with a specified identifier, if there is a specified identification code in the second database that is the same as this identification code, skip this identification code.
[0033] If there is no specified identification code in the second database that is the same as this identification code, store this identification code in the second database.
[0034] Determine whether the second database stores each identification code that is not configured with a specified identifier.
[0035] If the second database stores each identification code that is not configured with a specified identifier, send an upload success indication to the terminal device.
[0036] If the second database does not store each identification code that is not configured with a specified identifier, send an upload failure indication to the terminal device.
[0037] An identification code uploading device provided by the present invention is arranged in a terminal device, and the terminal device is communicatively connected to a server. The device includes:
[0038] An obtaining module, configured to obtain a tabular file storing multiple identification codes;
[0039] An uploading module, configured to store the multiple identification codes in the tabular file into a first database, and send an upload request to the server to upload the multiple identification codes to the server; wherein, in the first database, each successfully uploaded identification code is configured with a specified identifier indicating successful upload;
[0040] A supplementary upload module, configured to, during the upload process, when the communication between the terminal device and the server is disconnected and then reconnected, send a supplementary upload request to the server to continue uploading the identification codes in the first database that are not configured with the specified identifier to the server.
[0041] An identification code uploading device provided by the present invention is arranged in a server, and the server is communicatively connected to a terminal device. The device includes:
[0042] A first receiving module, configured to receive multiple unlabeled identification codes from the terminal device if a supplementary recording request from the terminal device is received;
[0043] A first storage module, configured to store the multiple unlabeled identification codes in a second database;
[0044] A first determination module, configured to determine whether the multiple unlabeled identification codes are successfully stored in the second database;
[0045] A first sending module, configured to send an upload success indication to the terminal device if the storage in the second database is successful;
[0046] A second sending module, configured to send an upload failure indication to the terminal device if the storage in the second database is not successful;
[0047] A second receiving module, configured to receive multiple identification codes from the terminal device if an upload request from the terminal device is received;
[0048] A second storage module, configured to store the multiple identification codes in the second database;
[0049] A second determination module, configured to determine whether there are the same identification codes in the second database;
[0050] A third sending module, configured to send an upload failure indication to the terminal device if there are the same identification codes in the second database;
[0051] A third judgment module, configured to determine whether multiple identification codes are normally stored in the second database if the same identification code does not exist in the second database;
[0052] A fourth sending module, configured to send an upload success indication to the terminal device if the codes are normally stored in the second database;
[0053] A fifth sending module, configured to send an upload failure indication to the terminal device if the codes are not normally stored in the second database.
[0054] An electronic device provided by the present invention includes a processor and a memory. The memory stores machine-executable instructions that can be executed by the processor. The processor executes the machine-executable instructions to implement the identification code upload method of any one of the above.
[0055] A machine-readable storage medium provided by the present invention stores machine-executable instructions. When the machine-executable instructions are called and executed by a processor, the machine-executable instructions cause the processor to implement the identification code upload method of any one of the above.
[0056] An identification code upload method, device, and electronic device provided by the present invention. The method is applied to a terminal device that is communicatively connected to a server. The method includes: obtaining a table file storing multiple identification codes; storing the multiple identification codes in a first database and sending an upload request to the server to upload the multiple identification codes to the server. Among them, in the first database, each successfully uploaded identification code is configured with a specified identifier indicating upload success. In this way, since each successfully uploaded identification code in the first database is configured with a specified identifier indicating upload success, when the communication between the terminal device and the server is disconnected during the upload process and then reconnected, a retransmission request can be sent to the server to continue uploading the identification codes in the first database that are not configured with the specified identifier to the server, thereby ensuring that the identification codes are uploaded to the server completely and without repetition, and improving the efficiency of uploading the identification codes to the server. BRIEF DESCRIPTION OF THE DRAWINGS
[0057] In order to more clearly illustrate the specific embodiments of the present invention or the technical solutions in the prior art, the following will briefly introduce the drawings required for the description of the specific embodiments or the prior art. Obviously, the following drawings are some embodiments of the present invention. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative efforts.
[0058] Figure 1 It is a flowchart of an identification code upload method provided by an embodiment of the present invention;
[0059] Figure 2Schematic diagram of the process of uploading an identification code to the server provided by an embodiment of the present invention;
[0060] Figure 3 Flowchart of another identification code uploading method provided by an embodiment of the present invention;
[0061] Figure 4 Schematic diagram of an Excel file that meets the preset format requirements provided by an embodiment of the present invention;
[0062] Figure 5 Logic flowchart of a terminal device reading an Excel document of a UUID and uploading the UUID to the server provided by an embodiment of the present invention;
[0063] Figure 6 Flowchart of another identification code uploading method provided by an embodiment of the present invention;
[0064] Figure 7 Logic flowchart of a server receiving a UUID and storing it in a second database provided by an embodiment of the present invention;
[0065] Figure 8 Schematic diagram of the structure of an identification code uploading device provided by an embodiment of the present invention;
[0066] Figure 9 Schematic diagram of the structure of another identification code uploading device provided by an embodiment of the present invention;
[0067] Figure 10 Schematic diagram of the structure of an electronic device provided by an embodiment of the present invention. Detailed implementation manners
[0068] Next, the technical solutions of the present invention will be described clearly and completely in conjunction with the embodiments. Obviously, the described embodiments are part of the embodiments of the present invention, rather than all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope of the present invention.
[0069] Currently, a UUID is a unique parameter obtained through an algorithm and is used as the unique identifier for hardware devices to connect to the network. Companies need to purchase it from service providers that provide UUIDs, so each UUID is very precious. Generally, companies will upload the UUID to their own servers for storage and write the UUID into the device during the device production process. Service providers that provide UUIDs generally save the UUIDs in Excel and distribute them to customer companies. Uploading to their own company's server requires the assistance of additional developed software.
[0070] Generally speaking, the software logic for uploading UUIDs to the server is usually to first parse and save the UUIDs in the memory of the local PC software, and then upload each UUID directly to the server software and save it in the database. Once the server software or the local PC software crashes during the upload, or even causes the software to crash or the computer system to shut down automatically, or there is an abnormal situation such as a network disconnection, the local PC software has no upload record. If uploading to the server again, it can only be uploaded again, which is very time-consuming. If the server software does not clear the previously uploaded UUIDs from the database, the database will store the same UUID parameters, and the redundant data will occupy the server hard disk space and may even cause an error when inserting data into the database.
[0071] To facilitate the understanding of this embodiment, first, a method for uploading identification codes disclosed in the embodiments of the present invention will be introduced in detail. This method is applied to a terminal device, such as Figure 1 As shown, the method includes the following steps:
[0072] Step S102, obtain a table file storing multiple identification codes.
[0073] The above-mentioned identification code generally refers to a Universally Unique Identifier (abbreviated as UUID), which can enable all elements in a distributed system to have unique identification information without the need to specify the identification information through a central control terminal. In this way, everyone can create UUIDs that do not conflict with others. In such a case, there is no need to consider the problem of name duplication when creating a database.
[0074] In actual implementation, UUID service providers such as Alibaba Cloud and Tencent Cloud generally save UUIDs in Excel. Therefore, the above-mentioned multiple table files are usually Excel files.
[0075] Step S104, store the multiple identification codes in the table file in a first database, and send an upload request to the server to upload the multiple identification codes to the server; wherein, in the first database, each successfully uploaded identification code is configured with a specified identifier indicating successful upload.
[0076] The above-mentioned terminal device is generally communicatively connected to the server. The terminal device generally refers to a PC (Personal Computer), such as a tablet computer, a laptop computer, a desktop computer, etc.; the above-mentioned first data can be the database of the PC.
[0077] In the specific implementation process, reference can be made to such as Figure 2Schematic diagram of the process of uploading an identification code to a server. A PC computer (equivalent to the above-mentioned terminal device, which can be a computer installed with the "Whale Vision Cloud UUID Management Tool") communicates with the server (which can be a server installed with the "Whale Vision Cloud UUID Management" server software) and is connected. Among them, the PC computer can be configured with a local database (equivalent to the above-mentioned first database), and the server can be configured with a server database. After obtaining a table file containing multiple identification codes, multiple identification codes can be obtained, stored in the local database, and an upload request is sent to the server. Then, multiple identification codes are uploaded to the server, and the identification codes successfully uploaded are saved to the server database. In actual implementation, after each identification code in the first database is successfully uploaded to the server, it can carry a specified identifier indicating successful upload, such as S, etc. That is, if a certain identification code in the first database has the specified identifier S, it means that the identification code has been successfully uploaded to the server.
[0078] Step S106, during the upload process, when the communication between the terminal device and the server is disconnected and then reconnected, a retransmission request is sent to the server to continue uploading the identification codes in the first database that are not configured with the specified identifier to the server.
[0079] In actual implementation, during the process of uploading the UUID to the server, due to various network abnormalities or computer and server abnormalities, etc., the communication between the terminal device and the server may be disconnected, resulting in the inability to upload the identification code normally or the termination of the upload. After waiting for the network or the computer and server to return to normal and the communication is reconnected, a retransmission request can be sent to the server to continue uploading the identification codes in the first database without the specified identifier to the server, thereby ensuring that the UUID is uploaded to the server continuously, completely, without repetition, and improving the security, integrity, efficiency, and disaster tolerance (ability to handle exceptions) of uploading the uuid to the server.
[0080] The identification code upload method provided in the above embodiment is applied to a terminal device. The terminal device communicates with the server. The method includes: obtaining a table file containing multiple identification codes; storing multiple identification codes in the first database and sending an upload request to the server to upload multiple identification codes to the server; among them, in the first database, each successfully uploaded identification code is configured with a specified identifier indicating successful upload; in this way, since each successfully uploaded identification code in the first database is configured with a specified identifier indicating successful upload, when the communication between the terminal device and the server is disconnected during the upload process and then reconnected, a retransmission request can be sent to the server to continue uploading the identification codes in the first database that are not configured with the specified identifier to the server, thereby ensuring that the identification codes are uploaded to the server continuously, completely, without repetition, and improving the efficiency of uploading the identification codes to the server.
[0081] An embodiment of the present invention also provides another method for uploading identification codes, which is implemented on the basis of the method in the above embodiment; as Figure 3 shown, the method includes the following steps:
[0082] Step S202, obtain a table file storing multiple identification codes.
[0083] Step S204, determine whether the table file meets the preset format requirements.
[0084] Step S206, if the table file meets the preset format requirements, store the multiple identification codes in the table file into the first database.
[0085] In the specific implementation process, reference can be made to a schematic diagram of an Excel file that meets the preset format requirements as Figure 4 shown. After obtaining the Excel file (equivalent to the above table file) storing multiple identification codes, it can be first determined whether the file format of the Excel file is xls (the specified file format). If the file format is not xls, it is prompted that the file format does not meet the requirements. If the file format is xls, it can then be determined whether the first column of the first row of the worksheet "sheet1" (the Excel file is actually a kind of worksheet) is "uuid" (identification code) and whether the second column of the first row is "key" (password). If any of the three situations where the first column of the first row is not "uuid" and the second column of the first row is not "key", or the first column of the first row is "uuid" while the second column of the first row is not "key", or the first column of the first row is not "uuid" while the second column of the first row is "key" occurs, it is prompted that the file content does not meet the requirements. However, if the first column of the first row is "uuid" and the second column of the first row is "key", it can then be determined whether the total number of rows of the worksheet "sheet1" exceeds two rows. If it does not exceed, it is prompted that the file uuid is empty. If it exceeds two rows, all the uuids in the table file can be written row by row into the local database.
[0086] In actual implementation, the UUID file formats provided by different service providers are uncertain. By setting the specified file format as xls in advance in the above method, if the file format of the Excel file is not xls, the entire upload process can be directly exited, and it is not necessary to require a high disaster tolerance ability to be compatible with multiple file formats, making the server easy to maintain.
[0087] Step S208, determine whether the number of identification codes in the table file is greater than a preset threshold.
[0088] Step S210, if the number of identification codes in the form file is not greater than a preset threshold, send an upload request to the server to upload all the identification codes in the form file to the server at one time; wherein, in the first database, each successfully uploaded identification code is configured with a specified identifier indicating successful upload.
[0089] In the specific implementation process, the above preset threshold can be set according to the actual situation, such as 100, 200, etc. After writing all the uuids in the form file into the local database line by line, the number of identification codes can be obtained (in fact, it can also be the number of data lines, and each data line includes an identification code and its corresponding password). Assuming the number of identification codes is 70 and the preset threshold is 100, these 70 identification codes can be uploaded to the server all at once without separating the 70 identification codes and uploading them in multiple times.
[0090] Step S212, determine whether an upload success indication is received from the server within a first preset time.
[0091] Step S214, if an upload success indication is not received from the server and an instruction to re-upload all the identification codes in the form file to the server is received, repeat the step of sending an upload request to the server to upload all the identification codes in the form file to the server until a specified identifier is added to each identification code in the first database.
[0092] In the specific implementation process, the time unit of the first preset time can be seconds, such as 1 second, 2 seconds, etc. If all the above 70 identification codes are uploaded to the server together and an upload success indication is received from the server within the first preset time, it means that the uuid has been successfully uploaded to the server. If no indication is received, it may prompt that the upload to the server is abnormal. In this case, if the user chooses to re-upload, the process of uploading these 70 identification codes all together to the server can be repeated until all 70 identification codes successfully carry the S identifier.
[0093] Step S216, if the number of identification codes in the form file is greater than the preset threshold, divide multiple identification codes into multiple data groups based on the preset threshold; wherein, the number of identification codes in each data group is less than or equal to the preset threshold.
[0094] In the specific implementation process, after writing all the uuids in the table file into the local database line by line, the number of identification codes can be obtained (in fact, it can also be the number of data rows, and each row of data includes an identification code and its corresponding password). Assuming the number of identification codes is 300 and the preset threshold is 100, these 300 identification codes can be divided into 3 groups, with each group including 100 identification codes; assuming the number of identification codes is 370 and the preset threshold is 100, these 370 identification codes can be divided into 4 groups, where the first 3 groups include 100 identification codes each, and the last group includes 70 identification codes.
[0095] Step S218: Send an upload request to the server to upload multiple data groups to the server in sequence; among them, in the first database, the identification codes in each successfully uploaded data group are configured with a specified identifier indicating successful upload.
[0096] In the specific implementation process, this step S212 can be implemented through the following steps 1 to 7:
[0097] Step 1: Take the first data group as the current data group and send an upload request to the server to upload the current data group to the server.
[0098] Step 2: Determine whether an upload success indication is received from the server within the first preset time.
[0099] Step 3: If an upload success indication is received from the server, add a specified identifier to each identification code corresponding to the current data group in the first database.
[0100] In the specific implementation process, assuming that after grouping, 3 data groups are obtained, with each group including 100 identification codes, the first data group can be uploaded to the server first, and an upload request is sent to the server. For the first data group, if an upload success indication feedback from the server is received within the first preset time, the S identifier can be added to the 100 identification codes of the first data group.
[0101] Step 4: If an upload success indication is not received from the server, determine whether the terminal device is disconnected from the server.
[0102] Step 5: If the terminal device is not disconnected from the server and a command to continue uploading the current data group to the server is received, repeat the step of sending an upload request to the server to upload the current data group to the server until a specified identifier is added to each identification code corresponding to the current data group in the first database.
[0103] For the first data group, if the upload success indication feedback from the server is not received within the first preset time, it can be determined whether the terminal device is disconnected from the server (such as the computer shutting down, crashing, etc.). If the terminal device is not disconnected from the server, an upload error can be prompted. In this case, if the user selects to continue uploading the current data group, the upload request can be repeatedly sent to the server until the 100 identification codes corresponding to the first data group in the first database all carry the S identifier.
[0104] Step 6: During the upload process, when the communication between the terminal device and the server is disconnected and then reconnected, a supplementary upload request is sent to the server to continue uploading the identification codes in the first database that are not configured with the specified identifier to the server.
[0105] If the terminal device is disconnected from the server during the upload of the first data group, it can wait until reconnection (such as the computer restarting) and then select supplementary upload to continue uploading the identification codes in the first database that are not configured with the specified identifier to the server (since the first data group was not uploaded successfully and the other data groups were not uploaded successfully either, none of the identification codes in the first database have the specified identifier).
[0106] Step 7: If there is a next data group for the current data group, the next data group is taken as the new current data group, and the steps of repeatedly sending an upload request to the server to upload the current data group to the server are executed until all multiple data groups are uploaded to the server.
[0107] For the first data group, if the 100 identification codes corresponding to the first data group all carry the S identifier, that is, the first data group is successfully uploaded to the server, it can then be determined whether there is a second data group. Since 3 data groups are obtained after grouping, the above steps need to be repeatedly executed.
[0108] Specifically, upload the second data group to the server and send an upload request to the server. For the second data group, if the upload success indication feedback from the server is received within the first preset time, the S identifier can be added to the 100 identification codes of the second data group. If the upload success indication feedback from the server is not received within the first preset time and the terminal device is not disconnected from the server, the upload request can be repeatedly sent to the server until the 100 identification codes corresponding to the second data group in the first database all carry the S identifier. If the terminal device is disconnected from the server during the upload of the second data group, it can wait until reconnection and then select supplementary upload to continue uploading the identification codes in the first database that are not configured with the specified identifier to the server (since the first data group was uploaded successfully and the other data groups were not uploaded successfully, except for the 100 identification codes corresponding to the first data group, none of the other identification codes in the first database have the specified identifier).
[0109] For the second data group, if all 100 identification codes corresponding to the second data group carry the S identifier, that is, the second data group is successfully uploaded to the server, it can then be determined whether there is a third data group. Since 3 data groups are obtained after grouping, the above steps need to be repeatedly executed.
[0110] Specifically, upload the third data group to the server and send an upload request to the server. For the third data group, if an upload success indication feedback from the server is received within the first preset time, the S identifier can be added to the 100 identification codes of the third data group. If an upload success indication feedback from the server is not received within the first preset time and the terminal device is not disconnected from the server, the upload request can be repeatedly sent to the server until all 100 identification codes corresponding to the third data group in the first database carry the S identifier. If the terminal device is disconnected from the server during the upload of the third data group, it can wait until reconnection and select to re-upload the identification codes that are not configured with the specified identifier in the first database to the server (since the first data group is uploaded successfully, the second data group is uploaded successfully, and other data groups are not uploaded successfully, so in the first database, except for the 100 identification codes corresponding to the first data group and the 100 identification codes corresponding to the second data group, other identification codes do not have the specified identifier).
[0111] For the third data group, if all 100 identification codes corresponding to the third data group carry the S identifier, that is, the third data group is successfully uploaded to the server, it can then be determined whether there is a third data group. Since 3 data groups are obtained after grouping, all data groups have been successfully uploaded to the server.
[0112] The identification code upload method provided in the above embodiment is applied to a terminal device. The terminal device is communicatively connected to the server. By obtaining a table file storing multiple identification codes; determining whether the table file meets the preset format requirements, if the table file meets the preset format requirements, storing the multiple identification codes in the table file into the first database, if the number of identification codes in the table file is not greater than the preset threshold, sending an upload request to the server, and all identification codes in the table file can be uploaded to the server at one time; if the number of identification codes in the table file is greater than the preset threshold, sending an upload request to the server, and all identification codes in the table file can be grouped and uploaded to the server; whether it is uploaded at one time or grouped, each successfully uploaded identification code in the first database can be configured with a specified identifier indicating upload success.
[0113] For one upload, since all identification codes are uploaded at one time, assuming that re-upload is needed, duplicate identification codes can be avoided on the server. This is because if an upload is unsuccessful, no identification code corresponding to that upload will appear in the identification code. For grouped uploads, since each successfully uploaded identification code in the first database is configured with a designated identifier indicating a successful upload, when the terminal device loses communication with the server during the upload process, a retransmission request can be sent to the server when the terminal device reconnects to continue uploading the identification codes in the first database that are not configured with the designated identifier to the server, thereby ensuring that the identification codes are uploaded to the server complete and non-duplicate. This improves the efficiency of uploading identification codes to the server.
[0114] For a better understanding of the above embodiments, please refer to Figure 5 A logic flow chart of a terminal device reading an Excel document of a UUID and uploading the UUID to a server is shown.
[0115] The terminal device can be installed with the "Jingshi Cloud UUID Management Tool". When actually implementing it, you can first select the upload uuid function in the auxiliary software "Jingshi Cloud UUID Management Tool". Then you can choose whether to re-upload according to the actual situation. If you do not choose to re-upload, the user can choose to read the Excel file that stores the UUID (equivalent to obtaining a table file that stores multiple identification codes) and determine whether the Excel file is in the specified file format xls. If not, for example, xlsx, it will prompt that the file format does not match and exit the auxiliary software directly. If so, then determine whether the first row and first column of the worksheet "sheet1" is "uuid" and whether the first row and second column is "key". If sheet1 "The first row and the first column are "uuid" and the first row and the second column are "key". You can then determine whether the total number of rows in the worksheet "sheet1" exceeds two rows. Otherwise, it will prompt that the file content does not match and exit the auxiliary software directly. If the total number of rows in the worksheet "sheet1" does not exceed two rows, it will prompt that the file uuid is empty and exit the auxiliary software directly. If it exceeds two rows, you can write the uuid to the local database line by line, and then determine whether there is an exception in the process of writing to the local database. If an exception occurs, you can clear the data in the local database and prompt that an exception message has occurred. In this regard, the user can choose whether to re-upload. If so, you can re-write the uuid to the local database line by line. If not, exit the auxiliary software directly.
[0116] If there is no exception during the process of writing to the local database and you want to send the uuids without identification in the local database to the server, you can first check if the data in the local database (i.e., all the uuids without identification and their corresponding keys) exceeds 100 rows. This is equivalent to checking if the number of uuids without identification exceeds 100 (equivalent to checking if the number of identification codes in the table file is greater than the preset threshold). If it does not exceed 100, send all the uuids without identification in the local database to the server together. Then, check if the server feedbacks that it has received the data normally and saved it to the database within 3 seconds (equivalent to checking if an upload success indication is received from the server within the first preset time). If it is received, it means the uuid has been successfully uploaded to the server. If it is not received, prompt that it cannot be uploaded to the server normally, and let the user choose whether to re-upload. If the user does not choose to re-upload, directly exit the auxiliary software. If the user chooses to re-upload, send all the uuids without identification in the local database to the server again.
[0117] If the number of uuids without identification in the local database exceeds 100, they can be uploaded in groups, with 100 rows in each group. When uploading each group, send an upload request to the server, and then check if the server feedbacks that it has received the data normally and saved it to the database within 3 seconds. If it is not received, check if the software crashes (equivalent to checking if the device terminal is disconnected from the server). If the software crashes, after the software restarts (reconnects), you can continue to choose whether to make up the record or not. If you choose to make up the record, you can send a make-up record request. Then, check if the local database is empty. If it is empty, prompt that there is no archive locally and directly exit the auxiliary software. If it is not empty, continue to send the uuids without identification in the local database to the server. If the server does not feedback that it has received the data normally and saved it to the database within 3 seconds and the software does not crash, you can prompt that the data upload has an error and let the user judge whether to continue uploading. If the user chooses to continue uploading, continue to send an upload request to the server.
[0118] If the server feedbacks that it has received the data normally and saved it to the database within 3 seconds, you can add an identification to the uploaded uuids in the local database, and then check if the grouped upload is completed (equivalent to checking if there is a next data group). If the grouped upload is not completed, continue to upload the next group and send an upload request to the server. If the grouped upload is completed, it means the uuid has been successfully uploaded to the server.
[0119] The method of uploading UUIDs saved in Excel in the local database to the server and saving them in the database can solve the defects in the prior art that it is impossible to ensure that the UUIDs saved in Excel in the local database are uploaded to the server without duplication and saved in the database in a hardware resource-saving manner in various network anomalies or computer / server anomalies. Moreover, in this embodiment, the auxiliary software "Whale Vision Cloud UUID Management Tool" installed in the terminal device is used to parse the UUID data in the Excel table and save it in the local database. Compared with directly sending the entire Excel table of UUIDs to the server using local PC software in the prior art and letting the server software parse the UUID data in the Excel table and save it in the database, the server burden can be reduced.
[0120] Another identification code uploading method is also provided in an embodiment of the present invention. The method is applied to a server, and the server is communicatively connected to a terminal device. This method is implemented on the basis of the method in the above embodiment; as Figure 6 shown, the method includes the following steps:
[0121] Step S302, if an upload request from the terminal device is received, receive the multiple identification codes carried in the upload request, and sequentially store the multiple identification codes in the second database.
[0122] The above-mentioned second database can be a server database.
[0123] Step S304, if there is an identification code in the second database that is the same as at least one of the multiple identification codes, delete the uploaded identification codes corresponding to the upload request, and send an upload failure indication to the terminal device.
[0124] Step S306, if the identification codes in the second database are not repeated with each of the multiple identification codes, send an upload success indication to the terminal device.
[0125] Specifically, reference can be made to, for example, Figure 7The logical flowchart of a server receiving a UUID and storing it in a second database is shown. Multiple identification codes can be carried in the upload request. If the uuid upload request received from the PC side (equivalent to the upload request from the terminal device) is not a supplementary upload request, the multiple identification codes can be stored in the second database in sequence, and it is judged whether duplicate data is found when inserting the uuid data (the above multiple identification codes) into the database. If duplicate data is found, for example, when storing one of the multiple identification codes (assumed to be 01) in the second database, and exactly the identification code 01 already exists in the second database, the data writing can be terminated, and all the data that has been written in this request can be deleted, and then a failure and exception message can be sent to the PC side (equivalent to sending an upload failure indication to the terminal device above). If no duplicate data is found, the data can be written directly normally. When writing, if all the data is written to the database normally, a message that the data has been received normally and saved to the database can be sent to the PC side (equivalent to sending an upload success indication to the terminal device).
[0126] Step S308, if a supplementary upload request from the terminal device is received, receive the identification codes carried in the supplementary upload request that are not configured with a specified identifier indicating upload success.
[0127] Step S310, for each identification code not configured with a specified identifier, if there is a duplicate specified identification code in the second database, skip this identification code.
[0128] Step S312, if there is no duplicate specified identification code in the second database for this identification code, store this identification code in the second database.
[0129] Step S314, judge whether the second database stores each identification code not configured with a specified identifier.
[0130] Step S316, if the second database stores each identification code not configured with a specified identifier, send an upload success indication to the terminal device.
[0131] Step S318, if the second database does not store each identification code not configured with a specified identifier, send an upload failure indication to the terminal device.
[0132] Specifically, it can still be referred to as Figure 7The logical flowchart of a server receiving a UUID and storing it in a second database is shown. If the uuid upload request sent from the PC side (equivalent to the upload request from the terminal device) received is a supplementary upload request, the supplementary upload request can carry multiple identification codes that are not configured with a specified identifier indicating successful upload. When inserting uuid data (the above-mentioned multiple identification codes that are not configured with a specified identifier indicating successful upload) into the database in sequence, if duplicate data is found, for example, when a certain identification code that is not configured with a specified identifier indicating successful upload (assumed to be 21) is stored in the second database, and exactly the identification code 21 that is not configured with a specified identifier indicating successful upload already exists in the second database, the duplicate data can be automatically skipped and the next non-duplicate data can be written; if no duplicate data is found, the data can be directly written normally. When writing, if all data is written to the database normally (equivalent to the above-mentioned second database storing each identification code without a specified identifier), a normal data reception and save to the database can be sent to the PC side (equivalent to sending an upload success indication to the terminal device). In step S318, if the data is not written to the database normally (equivalent to the above-mentioned second database not storing each identification code without a specified identifier), the data writing can be terminated, and all the data that has been written in this supplementary recording request can be deleted, and then a failure and exception message can be sent to the PC side (equivalent to sending an upload failure indication to the terminal device as mentioned above).
[0133] The identification code upload method provided by the above embodiment is applied to a server. The server is communicatively connected to a terminal device. If there is an identification code in the second database that is the same as at least one of the multiple identification codes carried in the upload request, the uploaded identification codes corresponding to the upload request are deleted, and an upload failure indication is sent to the terminal device; if a supplementary upload request from the terminal device is received, the identification codes carried in the supplementary upload request that are not configured with a specified identifier indicating successful upload are received. For each identification code carried in the supplementary upload request that is not configured with a specified identifier indicating successful upload, if there is a duplicate specified identification code in the second database, this identification code is skipped. This way can avoid storing the same UUID parameters in the second database, avoid data insertion errors in the second database, thereby saving server hard disk space, and solve the defects in the prior art that it is impossible to ensure that the UUID saved in Excel locally is saved in the database in a hardware resource-saving manner under various network anomalies or computer and server anomalies.
[0134] An embodiment of the present invention also provides an identification code upload device. The device is set in a terminal device. The terminal device is communicatively connected to a server, as Figure 8As shown in the figure, the device includes: an acquisition module 80, configured to acquire a table file storing multiple identification codes; an upload module 81, configured to store the multiple identification codes in the table file into a first database and send an upload request to the server to upload the multiple identification codes to the server; wherein, in the first database, each successfully uploaded identification code is configured with a specified identifier indicating successful upload; a re-upload module 82, configured to, during the upload process, when the communication between the terminal device and the server is disconnected and then reconnected, send a re-upload request to the server to continue uploading the identification codes in the first database that are not configured with the specified identifier to the server.
[0135] The identification code upload device provided in the above embodiment is disposed in a terminal device. The terminal device is communicatively connected to a server and includes: acquiring a table file storing multiple identification codes; storing the multiple identification codes in a first database and sending an upload request to the server to upload the multiple identification codes to the server; wherein, in the first database, each successfully uploaded identification code is configured with a specified identifier indicating successful upload; in this device, since each successfully uploaded identification code in the first database is configured with a specified identifier indicating successful upload, when the communication between the terminal device and the server is disconnected during the upload process and then reconnected, a re-upload request can be sent to the server to continue uploading the identification codes in the first database that are not configured with the specified identifier to the server, thereby ensuring that the identification codes are uploaded to the server completely and without repetition, and improving the efficiency of uploading the identification codes to the server.
[0136] Furthermore, the upload module 81 is further configured to determine whether the table file meets a preset format requirement; if the table file meets the preset format requirement, store the multiple identification codes in the table file into the first database.
[0137] Furthermore, the upload module 81 is further configured to determine whether the number of identification codes in the table file is greater than a preset threshold; if the number of identification codes in the table file is greater than the preset threshold, divide the multiple identification codes into multiple data groups based on the preset threshold; wherein, the number of identification codes in each data group is less than or equal to the preset threshold; send an upload request to the server to upload the multiple data groups to the server in sequence; wherein, in the first database, each identification code in each successfully uploaded data group is configured with a specified identifier indicating successful upload.
[0138] Further, the upload module 81 is further configured to use the first data group as the current data group and send an upload request to the server to upload the current data group to the server; determine whether an upload success indication is received from the server within a first preset time; if an upload success indication is received from the server, add a specified identifier to each identification code corresponding to the current data group in the first database; if an upload success indication is not received from the server, determine whether the terminal device is disconnected from the server; if the terminal device is not disconnected from the server and an instruction to continue uploading the current data group to the server is received, repeat the step of sending an upload request to the server to upload the current data group to the server until a specified identifier is added to each identification code corresponding to the current data group in the first database; if there is a next data group in the current data group, use the next data group as the new current data group and repeat the step of sending an upload request to the server to upload the current data group to the server until all the data groups are uploaded to the server.
[0139] Further, the device further includes: if the number of identification codes in the form file is not greater than a preset threshold, send an upload request to the server to upload all the identification codes in the form file to the server at one time; wherein, in the first database, each successfully uploaded identification code is configured with a specified identifier indicating upload success; determine whether an upload success indication is received from the server within a first preset time; if an upload success indication is not received from the server and an instruction to re-upload all the identification codes in the form file to the server at one time is received, repeat the step of sending an upload request to the server to upload all the identification codes in the form file to the server until a specified identifier is added to each identification code in the first database.
[0140] An embodiment of the present invention further provides an identification code upload device, which is disposed on the server, and the server is communicatively connected to the terminal device, as Figure 9 shown, the device includes: a first receiving module 90, configured to receive a plurality of unlabeled identification codes from the terminal device if a supplementary recording request from the terminal device is received;
[0141] a first storage module 91, configured to store the plurality of unlabeled identification codes in a second database;
[0142] a first judgment module 92, configured to judge whether the plurality of unlabeled identification codes are normally stored in the second database;
[0143] a first sending module 93, configured to send an upload success indication to the terminal device if the codes are normally stored in the second database;
[0144] a second sending module 94, configured to send an upload failure indication to the terminal device if the codes are not normally stored in the second database;
[0145] A second receiving module 95, configured to receive a plurality of identification codes from a terminal device if an upload request from the terminal device is received;
[0146] A second storage module 96, configured to store the plurality of identification codes into a second database;
[0147] A second determination module 97, configured to determine whether there are identical identification codes in the second database;
[0148] A third sending module 98, configured to send an upload failure indication to the terminal device if there are identical identification codes in the second database;
[0149] A third determination module 99, configured to determine whether the plurality of identification codes are normally stored into the second database if there are no identical identification codes in the second database;
[0150] A fourth sending module 100, configured to send an upload success indication to the terminal device if the codes are normally stored into the second database;
[0151] A fifth sending module 101, configured to send an upload failure indication to the terminal device if the codes are not normally stored into the second database.
[0152] The identification code upload device provided in the foregoing embodiment is applied to a server, and the server is communicatively connected to a terminal device. If there is an identification code in the second database that is the same as at least one of the plurality of identification codes carried in the upload request, the uploaded identification code corresponding to the upload request is deleted, and an upload failure indication is sent to the terminal device; if a re-upload request from the terminal device is received, the identification code carried in the re-upload request that is not configured with a specified identifier indicating upload success is received. For each identification code carried in the re-upload request that is not configured with a specified identifier indicating upload success, if there is a specified identification code in the second database that is the same as this identification code, this identification code is skipped. This device can avoid storing the same UUID parameter in the second database, avoid data insertion errors in the second database, thereby saving server hard disk space, and solving the defect in the prior art that it is impossible to ensure that the UUID saved in Excel locally is saved in the database in a hardware resource-saving manner under various network anomalies or computer and server anomalies.
[0153] The implementation principle and the technical effects generated by the identification code upload device provided in the embodiments of the present invention are the same as those of the foregoing identification code upload method embodiments. For the part of the identification code upload device embodiments, reference may be made to the corresponding content in the foregoing identification code upload method embodiments.
[0154] Embodiments of the present invention further provide an electronic device, see Figure 10As shown, the electronic device includes a processor 130 and a memory 131. The memory 131 stores machine-executable instructions that can be executed by the processor 130. The processor 130 executes the machine-executable instructions to implement the above identification code uploading method.
[0155] Furthermore, Figure 10 The electronic device shown further includes a bus 132 and a communication interface 133. The processor 130, the communication interface 133, and the memory 131 are connected through the bus 132.
[0156] Among them, the memory 131 may include a high-speed random access memory (RAM, Random Access Memory), and may also include a non-volatile memory, such as at least one disk memory. Through at least one communication interface 133 (which can be wired or wireless), a communication connection is established between this system network element and at least one other network element. The Internet, wide area network, local area network, metropolitan area network, etc. can be used. The bus 132 can be an ISA bus, a PCI bus, an EISA bus, etc. The said bus can be divided into an address bus, a data bus, a control bus, etc. For the sake of convenience of representation, Figure 10 only a two-way arrow is used in the figure, but it does not mean that there is only one bus or one type of bus.
[0157] The processor 130 may be an integrated circuit chip with signal processing capabilities. In the implementation process, each step of the above method can be completed by the integrated logic circuit of the hardware in the processor 130 or the instructions in the form of software. The above-mentioned processor 130 may be a general-purpose processor, including a central processing unit (CPU for short), a network processor (NP for short), etc.; it may also be a digital signal processor (DSP for short), an application specific integrated circuit (ASIC for short), a field-programmable gate array (FPGA for short), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components. It can implement or execute each method, step and logic block diagram disclosed in the embodiments of the present invention. The general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc. The steps of the method disclosed in combination with the embodiments of the present invention can be directly embodied as being executed and completed by a hardware decoding processor, or executed and completed by a combination of hardware and software modules in the decoding processor. The software module may be located in a mature storage medium in the art such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory, or an electrically erasable programmable memory, a register, etc. This storage medium is located in the memory 131, and the processor 130 reads the information in the memory 131 and combines its hardware to complete the steps of the method in the foregoing embodiments.
[0158] Embodiments of the present invention also provide a computer-readable storage medium storing computer-executable instructions that, when called and executed by a processor, cause the processor to implement the above identification code uploading method. For specific implementation, reference may be made to the method embodiments and will not be elaborated herein.
[0159] The identification code uploading method, device and electronic device provided by the embodiments of the present invention include a computer-readable storage medium storing program code, and the instructions included in the program code can be used to execute the method described in the foregoing method embodiments. For specific implementation, reference may be made to the method embodiments and will not be elaborated herein.
[0160] When the above-mentioned functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on such understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods described in various embodiments of the present invention. The foregoing storage medium includes: various media that can store program codes, such as USB flash drives, mobile hard disks, read-only memories (ROM, Read-Only Memory), random access memories (RAM, Random Access Memory), magnetic disks, or optical discs.
[0161] Finally, it should be noted that: the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that: they can still modify the technical solutions described in the foregoing embodiments, or perform equivalent replacements on some or all of the technical features; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the scope of the technical solutions of various embodiments of the present invention.
Claims
1. A method for uploading identification codes, characterized in that, The method is applied to a terminal device which is communicatively connected to a server. The method includes: Obtain a tabular file storing multiple identification codes; Store the multiple identification codes in the tabular file into a first database, and send an upload request to the server to upload the multiple identification codes to the server; wherein, in the first database, each successfully uploaded identification code is configured with a specified identifier indicating successful upload; During the upload process, when the communication between the terminal device and the server is disconnected and then reconnected, send a supplementary upload request to the server to continue uploading the identification codes in the first database that are not configured with the specified identifier to the server; Wherein, if the server receives an upload request from the terminal device, receive the multiple identification codes carried in the upload request, and sequentially store the multiple identification codes into a second database; if there is an identification code in the second database that is the same as at least one of the multiple identification codes, delete the uploaded identification codes corresponding to the upload request, and send an upload failure indication to the terminal device; if the identification codes in the second database are not repeated with each of the multiple identification codes, send an upload success indication to the terminal device; If the server receives a supplementary upload request from the terminal device, receive the identification codes carried in the supplementary upload request that are not configured with the specified identifier indicating successful upload; for each identification code not configured with the specified identifier, if there is a specified identification code in the second database that is the same as this identification code, skip this identification code; if there is no specified identification code in the second database that is the same as this identification code, store this identification code into the second database; determine whether the second database stores each identification code not configured with the specified identifier; if the second database stores each identification code not configured with the specified identifier, send an upload success indication to the terminal device; if the second database does not store each identification code not configured with the specified identifier, send an upload failure indication to the terminal device.
2. The method according to claim 1, wherein The step of storing the multiple identification codes in the tabular file into the first database includes: Determine whether the tabular file meets the preset format requirements; If the tabular file meets the preset format requirements, store the multiple identification codes in the tabular file into the first database.
3. The method according to claim 1, wherein The step of sending an upload request to the server to upload the multiple identification codes to the server includes: Determine whether the number of identification codes in the tabular file is greater than a preset threshold; If the number of identification codes in the tabular file is greater than the preset threshold, divide the multiple identification codes into multiple data groups based on the preset threshold; wherein, the number of identification codes in each data group is less than or equal to the preset threshold; Send an upload request to the server to sequentially upload the multiple data groups to the server; wherein, in the first database, the identification codes in each successfully uploaded data group are configured with a specified identifier indicating successful upload.
4. The method according to claim 3, wherein The steps of sending an upload request to the server to upload multiple data groups to the server in sequence include: Taking the first data group as the current data group and sending an upload request to the server to upload the current data group to the server; Judging whether an upload success indication is received from the server within a first preset time; If an upload success indication is received from the server, adding the specified identifier to each of the identifiers corresponding to the current data group in the first database; If an upload success indication is not received from the server, judging whether the terminal device is disconnected from the server; If the terminal device is not disconnected from the server and an instruction to continue uploading the current data group to the server is received, repeating the step of sending an upload request to the server to upload the current data group to the server until the specified identifier is added to each of the identifiers corresponding to the current data group in the first database; If there is a next data group for the current data group, taking the next data group as the new current data group and repeating the step of sending an upload request to the server to upload the current data group to the server until all the data groups are uploaded to the server.
5. The method according to claim 3, characterized in that, The method further includes: If the number of identifiers in the table file is not greater than the preset threshold, sending an upload request to the server to upload all the identifiers in the table file to the server at one time; wherein, in the first database, each successfully uploaded identifier is configured with a specified identifier indicating upload success; Judging whether an upload success indication is received from the server within a first preset time; If an upload success indication is not received from the server and an instruction to re-upload all the identifiers in the table file to the server at one time is received, repeating the step of sending an upload request to the server to upload all the identifiers in the table file to the server at one time until the specified identifier is added to each of the identifiers in the first database.
6. A method for uploading an identification code, characterized in that, The method is applied to a server which is communicatively connected to a terminal device, and the method includes: If an upload request is received from the terminal device, receiving the multiple identifiers carried in the upload request and storing the multiple identifiers into a second database in sequence; If there is an identifier in the second database that is the same as at least one of the multiple identifiers, deleting the uploaded identifiers corresponding to the upload request and sending an upload failure indication to the terminal device; If the identifiers in the second database are not repeated with each of the multiple identifiers, sending an upload success indication to the terminal device; If a re-upload request is received from the terminal device, receiving the identifiers that are not configured with a specified identifier indicating upload success carried in the re-upload request; For each identification code not configured with the specified identifier, if there is a duplicate specified identification code in the second database for this identification code, skip this identification code; If there is no duplicate specified identification code in the second database for this identification code, store this identification code in the second database; Determine whether the second database stores each identification code not configured with the specified identifier; If the second database stores each identification code not configured with the specified identifier, send an upload success indication to the terminal device; If the second database does not store each identification code not configured with the specified identifier, send an upload failure indication to the terminal device.
7. An identification code uploading device, characterized in that, The device is set in a terminal device, the terminal device is communicatively connected to a server, and the device includes: An acquisition module, configured to acquire a table file storing a plurality of identification codes; An upload module, configured to store the plurality of identification codes in the table file into a first database, and send an upload request to the server to upload the plurality of identification codes to the server; wherein, in the first database, each successfully uploaded identification code is configured with a specified identifier indicating successful upload; A re-upload module, configured to, during the upload process, when the communication between the terminal device and the server is disconnected and then reconnected, send a re-upload request to the server to continue uploading the identification codes not configured with the specified identifier in the first database to the server; Wherein, if the server receives an upload request from the terminal device, it receives the plurality of identification codes carried in the upload request, stores the plurality of identification codes into the second database in sequence; if there is an identification code in the second database that is the same as at least one of the plurality of identification codes, delete the uploaded identification codes corresponding to the upload request, and send an upload failure indication to the terminal device; if the identification codes in the second database are not repeated with each of the plurality of identification codes, send an upload success indication to the terminal device; If the server receives a re-upload request from the terminal device, it receives the identification codes not configured with the specified identifier indicating successful upload carried in the re-upload request; for each identification code not configured with the specified identifier, if there is a duplicate specified identification code in the second database for this identification code, skip this identification code; if there is no duplicate specified identification code in the second database for this identification code, store this identification code in the second database; determine whether the second database stores each identification code not configured with the specified identifier; if the second database stores each identification code not configured with the specified identifier, send an upload success indication to the terminal device; if the second database does not store each identification code not configured with the specified identifier, send an upload failure indication to the terminal device.
8. An identification code uploading device, characterized in that, The device is set in a server, the server is communicatively connected to a terminal device, and the device includes: A first receiving module, configured to receive a plurality of unlabeled identification codes from the terminal device if a supplementary recording request from the terminal device is received; A first storage module, configured to store the plurality of unlabeled identification codes into a second database; A first judgment module, configured to judge whether the plurality of unlabeled identification codes are normally stored into the second database; A first sending module, configured to send an upload success indication to the terminal device if the codes are normally stored into the second database; A second sending module, configured to send an upload failure indication to the terminal device if the codes are not normally stored into the second database; A second receiving module, configured to receive a plurality of identification codes from the terminal device if an upload request from the terminal device is received; A second storage module, configured to store the plurality of identification codes into the second database; A second judgment module, configured to judge whether there are identical identification codes in the second database; A third sending module, configured to send an upload failure indication to the terminal device if there are identical identification codes in the second database; A third judgment module, configured to judge whether the plurality of identification codes are normally stored into the second database if there are no identical identification codes in the second database; A fourth sending module, configured to send an upload success indication to the terminal device if the codes are normally stored into the second database; A fifth sending module, configured to send an upload failure indication to the terminal device if the codes are not normally stored into the second database.
9. An electronic device, characterized in that, It includes a processor and a memory. The memory stores machine-executable instructions that can be executed by the processor. The processor executes the machine-executable instructions to implement the identification code upload method according to any one of claims 1-6.
10. A machine-readable storage medium, characterized in that, The machine-readable storage medium stores machine-executable instructions. When the machine-executable instructions are called and executed by a processor, the machine-executable instructions cause the processor to implement the identification code upload method according to any one of claims 1-6.
Citation Information
Patent Citations
Data transmission method and device, server and computer equipment
CN114172894A
Method for quickly uploading mass files
CN115617760A