Method, device, storage medium and electronic equipment for identifying magnetic tape information

By acquiring image information of the magnetic tape, and using text and image recognition models to automatically identify the tape number, manufacturer, and model, the problem of low efficiency in manual identification is solved, and accurate and efficient identification and differentiation of magnetic tapes are achieved.

CN116843942BActive Publication Date: 2025-12-16INDUSTRIAL AND COMMERCIAL BANK OF CHINA
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202310576804.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-05-19
Publication Date
2025-12-16
Estimated Expiration
2043-05-19

AI Technical Summary

Technical Problem

The existing method of manually identifying tape manufacturers and versions is inefficient, resulting in low tape identification and partitioned storage efficiency.

Method used

By acquiring image information of the magnetic tape, and using text recognition and image recognition models, the system automatically identifies the tape number, manufacturer, and model, and sends the information to the user.

Benefits of technology

It enables accurate and efficient identification and differentiation of magnetic tapes, improves identification efficiency, and reduces human error and cumbersome approval processes.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116843942B_ABST
    Figure CN116843942B_ABST
Patent Text Reader

Abstract

The application discloses a magnetic tape information identification method and device, a storage medium and an electronic device. It relates to the field of artificial intelligence. The method comprises the following steps: acquiring image information of a target magnetic tape, wherein the image information comprises a magnetic tape appearance picture; acquiring a target image in the magnetic tape appearance picture through a character recognition model, and identifying the target image to obtain a magnetic tape number, wherein the target image comprises the magnetic tape number; identifying the magnetic tape appearance picture through an image recognition model to obtain a target organization to which the target magnetic tape belongs and a target model of the target magnetic tape; and sending the magnetic tape number, the target organization and the target model to a user terminal corresponding to the target magnetic tape. Through the application, the problem of low efficiency of the method for distinguishing magnetic tapes through manual identification in the related art is solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of artificial intelligence, and more specifically, to a method, apparatus, storage medium, and electronic device for identifying magnetic tape information. Background Technology

[0002] Tape is the primary backup medium in data backup and maintenance systems, typically stored in tape libraries for tape drives to retrieve and write data. However, as the volume of data center backups continues to increase, tape library slots are limited and can no longer meet the tape storage needs. Tapes are now being moved to tape repositories for storage. Meanwhile, backup technology has been constantly evolving in recent years, resulting in numerous tape and tape library manufacturers and continuous tape version upgrades. Different manufacturers and versions of tapes differ in performance configurations and compatibility with tape libraries. Therefore, accurate differentiation and partitioning of tapes for storage is crucial.

[0003] Because current tape backup software lacks the ability to identify tape manufacturers and versions, tape identification and differentiation still rely on manual statistics to determine the version, manufacturer, and other information for each tape. However, manual statistics are prone to errors, and data center security measures are stringent. Tapes are considered critical data assets, and the approval process for entering and leaving tape warehouses is cumbersome, resulting in low efficiency in tape identification and partitioned storage.

[0004] There is currently no effective solution to the problem of low efficiency in the method of distinguishing magnetic tapes by manual identification in related technologies. Summary of the Invention

[0005] This application provides a magnetic tape information identification method, apparatus, storage medium, and electronic device to solve the problem of low efficiency in related technologies that rely on manual identification to distinguish magnetic tapes.

[0006] According to one aspect of this application, a method for identifying magnetic tape information is provided. The method includes: acquiring image information of a target magnetic tape, wherein the image information includes an image of the tape's appearance; acquiring a target image from the image of the tape's appearance using a character recognition model, and recognizing the target image to obtain a tape number, wherein the target image includes the tape number; recognizing the image of the tape's appearance using an image recognition model to obtain the target organization to which the target tape belongs and the target model of the target tape; and sending the tape number, target organization, and target model to the user terminal corresponding to the target tape.

[0007] Optionally, acquiring image information of the target tape includes: identifying whether the target tape is located at a preset position; if the target tape is located at the preset position, controlling the camera to capture the target tape to obtain the current image of the target tape; identifying the current image and determining whether a tape number exists in the current image; if a tape number exists in the current image, determining the current image as image information; if no tape number exists in the current image, issuing an alarm message, wherein the alarm message indicates that there is an anomaly on the captured interface of the target tape.

[0008] Optionally, obtaining the target image from the image of the magnetic tape appearance through a text recognition model and recognizing the target image to obtain the magnetic tape number includes: determining the position information of the magnetic tape number in the image information; extracting the image where the magnetic tape number is located from the image information based on the position information to obtain the target image; and inputting the target image into the text recognition model to obtain the magnetic tape number, wherein the text recognition model is trained through multiple sample number images and the sample numbers in each sample number image.

[0009] Optionally, the image recognition model includes a first image recognition sub-model and multiple second image recognition sub-models. The process of recognizing the magnetic tape appearance image using the image recognition model to obtain the target organization and target model of the target magnetic tape includes: inputting the magnetic tape appearance image into the first image recognition sub-model to obtain the target organization to which the magnetic tape appearance image belongs, wherein the first image recognition sub-model is trained using multiple sample appearance images and the sample organization to which each sample appearance image belongs; determining the target recognition sub-model associated with the target organization from the multiple second image recognition sub-models; and inputting the magnetic tape appearance image into the target recognition sub-model to obtain the target model of the target magnetic tape, wherein the target recognition sub-model is trained using multiple sample appearance images and the sample model of each sample appearance image.

[0010] Optionally, the sub-models in the image recognition model are trained as follows: For each sub-model, a first sample data set associated with the sub-model is obtained, wherein the first sample data set is used to train the sub-model, and the sub-model includes a first image recognition sub-model or a second image recognition sub-model; M preset functions are obtained, and each function is used as a function in the sub-model in turn to obtain M initial sub-models; the first sample data set is input into each initial sub-model to obtain M sets of recognition results; the accuracy of each set of recognition results is calculated to obtain M accuracy rates, and the maximum value among the M accuracy rates is selected to obtain the first maximum accuracy rate, and the initial sub-model corresponding to the first maximum accuracy rate is determined as the sub-model applied in the image recognition model.

[0011] Optionally, before obtaining the M preset functions, the method further includes: for each preset function, obtaining a second sample data set associated with the preset function, wherein the second sample data set is used to calculate the parameters of the preset function; setting the preset function as a function in a sub-model to obtain a first preset sub-model; randomly generating N sets of parameter values ​​for the preset function to obtain N sets of parameter values, and configuring each set of parameter values ​​in the first preset sub-model to obtain N second preset sub-models; sequentially inputting the second sample data into each second preset sub-model to obtain N sets of recognition results; calculating the accuracy of each set of recognition results to obtain N accuracy rates, and selecting the accuracy rate greater than the preset accuracy rate from the N accuracy rates to obtain P accuracy rates, and obtaining the parameter values ​​corresponding to the P accuracy rates to obtain P sets of parameter values; constructing a parameter value selection interval from the P sets of parameter values, and determining the parameter value with the highest accuracy in the parameter value selection interval using a genetic algorithm to obtain the target parameter value; and adding the target parameter value to the preset function.

[0012] Optionally, determining the target parameter value by using a genetic algorithm to select the parameter value with the highest accuracy within the parameter value selection range includes: selecting any parameter value within the parameter value selection range to obtain an initial parameter value; configuring the initial parameter value in a first preset sub-model to obtain a candidate sub-model; inputting the second sample data into the candidate sub-model to obtain candidate results, and calculating the accuracy based on the candidate results to obtain the candidate accuracy; iteratively calculating the initial parameter value using the genetic algorithm to obtain an updated initial parameter value, wherein the updated initial parameter value is located within the parameter value selection range; repeatedly calculating the candidate accuracy based on the updated initial parameter value until the genetic algorithm completes H iterations to obtain H candidate accuracies; and determining the parameter value corresponding to the maximum candidate accuracy among the H candidate accuracies as the target parameter value.

[0013] According to another aspect of this application, a magnetic tape information identification device is provided. The device includes: a first acquisition unit for acquiring image information of a target magnetic tape, wherein the image information includes a picture of the tape's appearance; a second acquisition unit for acquiring a target image from the picture of the tape's appearance using a character recognition model, and recognizing the target image to obtain a tape number, wherein the target image includes the tape number; an identification unit for recognizing the picture of the tape's appearance using an image recognition model to obtain the target organization to which the target tape belongs and the target model of the target tape; and a sending unit for sending the tape number, target organization, and target model to the user terminal corresponding to the target tape.

[0014] According to another aspect of the present invention, a computer storage medium is also provided for storing a program, wherein the program, when running, controls the device where the computer storage medium is located to execute a magnetic tape information identification method.

[0015] According to another aspect of the present invention, an electronic device is also provided, comprising one or more processors and a memory; the memory stores computer-readable instructions, and the processor is used to execute the computer-readable instructions, wherein the computer-readable instructions execute a magnetic tape information identification method.

[0016] This application employs the following steps: acquiring image information of the target magnetic tape, including an image of the tape's appearance; acquiring the target image from the tape's appearance image using a text recognition model, recognizing the target image to obtain the tape number, where the target image includes the tape number; recognizing the tape's appearance image using an image recognition model to obtain the target organization and model number of the target tape; and sending the tape number, target organization, and target model number to the user terminal corresponding to the target tape. This solves the problem of low efficiency in related technologies that rely on manual identification to distinguish magnetic tapes. By acquiring an image of the magnetic tape and recognizing the tape number from the image, the number information is obtained. An image recognition model is then trained using a machine learning model to recognize the image of the magnetic tape, thereby obtaining information such as the tape's organization and model number that can be obtained from its appearance. This information is then sent to the user terminal, achieving accurate and efficient identification and differentiation of magnetic tapes. Attached Figure Description

[0017] The accompanying drawings, which form part of this application, are used to provide a further understanding of this application. The illustrative embodiments and descriptions of this application are used to explain this application and do not constitute an undue limitation of this application. In the drawings:

[0018] Figure 1 This is a flowchart of a magnetic tape information identification method provided according to an embodiment of this application;

[0019] Figure 2 This is an illustration of an optional target magnetic tape provided according to an embodiment of this application. Figure 1 ;

[0020] Figure 3 This is an illustration of an optional target magnetic tape provided according to an embodiment of this application. Figure 2 ;

[0021] Figure 4 This is a flowchart of an optional magnetic tape information identification process provided according to an embodiment of this application;

[0022] Figure 5 This is a schematic diagram illustrating the distribution of optional accuracy values ​​according to embodiments of this application;

[0023] Figure 6 This is a schematic diagram of a magnetic tape information identification device provided according to an embodiment of this application;

[0024] Figure 7 This is a schematic diagram of an electronic device provided according to an embodiment of this application. Detailed Implementation

[0025] It should be noted that, unless otherwise specified, the embodiments and features described in this application can be combined with each other. This application will now be described in detail with reference to the accompanying drawings and embodiments.

[0026] To enable those skilled in the art to better understand the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present application, and not all embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative effort should fall within the scope of protection of the present application.

[0027] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate for the embodiments of this application described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.

[0028] It should be noted that all information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for display, data used for analysis, etc.) involved in this disclosure are information and data authorized by the user or fully authorized by all parties. For example, this system has an interface with relevant users or organizations. Before obtaining relevant information, it is necessary to send an acquisition request to the aforementioned user or organization through the interface, and obtain the relevant information after receiving consent information from the aforementioned user or organization.

[0029] It should be noted that the magnetic tape information identification method, device, storage medium, and electronic device defined in this disclosure can be used in the field of artificial intelligence, or in any field other than artificial intelligence. The application fields of the magnetic tape information identification method, device, storage medium, and electronic device defined in this disclosure are not limited.

[0030] For ease of description, the following explains some of the nouns or terms used in the embodiments of this application:

[0031] Tape: It is the main backup medium of the data backup and maintenance system. It is usually stored in the tape library for tape drives to retrieve and write data.

[0032] According to an embodiment of this application, a method for identifying magnetic tape information is provided.

[0033] Figure 1 This is a flowchart of a magnetic tape information identification method provided according to an embodiment of this application. For example... Figure 1 As shown, the method includes the following steps:

[0034] Step S101: Obtain image information of the target magnetic tape, wherein the image information includes an image of the magnetic tape's appearance.

[0035] Specifically, after production, magnetic tapes have externally added information such as the tape number and name. Therefore, when identifying and storing magnetic tapes, the target tape can be photographed to obtain its image information. The appearance of the tape can then be extracted from this image, allowing the tape's information to be determined and thus enabling identification and classification.

[0036] Step S102: Obtain the target image from the magnetic tape appearance image through the text recognition model, and recognize the target image to obtain the magnetic tape number, wherein the target image includes the magnetic tape number.

[0037] Specifically, since the magnetic tape has its serial number printed on its exterior, when obtaining the serial number, the image with the serial number can be located in the image of the magnetic tape to obtain the target image. The target image is then identified in the image of the magnetic tape exterior using a text recognition model. The target image includes the magnetic tape serial number, which can be identified to obtain the magnetic tape serial number.

[0038] Step S103: Identify the appearance image of the magnetic tape using an image recognition model to obtain the target organization to which the target magnetic tape belongs and the target model of the target magnetic tape.

[0039] Specifically, after obtaining the tape serial number, it is also necessary to determine the tape's manufacturer and model. Since the manufacturer and model are not marked on the tape, they must be determined by examining the tape's appearance. At this point, an image recognition model can be used to identify the tape's appearance and accurately determine the manufacturer and model based on its appearance.

[0040] Step S104: Send the tape number, target organization, and target model to the user terminal corresponding to the target tape.

[0041] Specifically, after obtaining the tape number, target mechanism, and target model, the above information can be sent to the user terminal, where the tape can be classified and stored based on the identified information, thereby achieving the effect of accurate and efficient identification and differentiation of tapes.

[0042] The magnetic tape information identification method provided in this application involves acquiring image information of a target magnetic tape, including a picture of the tape's appearance; obtaining the target image from the tape's appearance image using a text recognition model, and recognizing the target image to obtain the tape number, which is also present in the target image; recognizing the tape's appearance image using an image recognition model to obtain the target organization and model number of the target tape; and sending the tape number, target organization, and target model number to the user terminal corresponding to the target tape. This method solves the problem of low efficiency in related technologies that rely on manual identification to distinguish magnetic tapes. By acquiring an image of the magnetic tape and recognizing the tape number from it, the method obtains the number information. Furthermore, by training an image recognition model using a machine learning model and recognizing the image of the magnetic tape, it obtains information such as the tape's organization and model number, which can be obtained from its appearance. This information is then sent to the user terminal, achieving accurate and efficient identification and differentiation of magnetic tapes.

[0043] Optionally, in the magnetic tape information identification method provided in this application embodiment, obtaining the image information of the target magnetic tape includes: identifying whether the target magnetic tape is located at a preset position; if the target magnetic tape is located at the preset position, controlling the camera to capture the target magnetic tape to obtain the current image of the target magnetic tape; identifying the current image and determining whether there is a magnetic tape number in the current image; if there is a magnetic tape number in the current image, determining the current image as image information; if there is no magnetic tape number in the current image, issuing an alarm message, wherein the alarm message indicates that there is an anomaly on the captured interface of the target magnetic tape.

[0044] Specifically, when acquiring image information of the target tape, it is necessary to first determine whether the target tape is located in a preset position. For example, a camera can be used to take a picture of the tape. However, in order to ensure the integrity and clarity of the captured image, the target tape needs to be placed in a preset position. The preset position can be a fixed location point or a preset area.

[0045] When the target tape is located in the preset area, the camera can be used to take pictures of the target tape. At this time, the camera can be controlled to take pictures of the target tape and obtain the current image of the target tape. However, since the tape number may be located on any surface of the target tape, it is also necessary to determine whether the tape number exists in the current image. If the tape number exists, the captured current image can be identified as the image information of the target tape. If the tape number does not exist, the staff will be notified to adjust the tape by sending an alarm message.

[0046] Figure 2 This is an illustration of an optional target magnetic tape provided according to an embodiment of this application. Figure 1 ,like Figure 2 As shown, first determine if the target tape is placed in the preset location. If it is placed in the preset location, acquire the current image and determine if the tape number exists in the current image, such as... Figure 2 As shown, if it exists, the current image is identified as the image information of the target magnetic tape, so that the image information can be used to identify the magnetic tape information.

[0047] Optionally, in the magnetic tape information recognition method provided in this application embodiment, obtaining the target image in the magnetic tape appearance image through a text recognition model and recognizing the target image to obtain the magnetic tape number includes: determining the position information of the magnetic tape number in the image information; extracting the image where the magnetic tape number is located from the image information according to the position information to obtain the target image; and inputting the target image into the text recognition model to obtain the magnetic tape number, wherein the text recognition model is trained through multiple sample number images and the sample numbers in each sample number image.

[0048] Specifically, when using a text recognition model to identify the cassette tape number, the image containing the tape's appearance contains a lot of information, such as the tape's identification information and production date. Therefore, it is necessary to determine the location of the tape number from the image. This can be done by identifying font color or pre-defined markings, such as the word "number". After identification, the target image containing the tape number is extracted from the image based on the location information. The tape number is then determined by directly scanning the text in the target image, thus achieving the goal of accurately obtaining the tape number.

[0049] For example, Figure 3 This is an illustration of an optional target magnetic tape provided according to an embodiment of this application. Figure 2 ,like Figure 3 As shown, there may be a lot of text content in the image of the magnetic tape. Therefore, when identifying the magnetic tape number, it is necessary to extract the target image containing the magnetic tape number from the image of the magnetic tape, so as to improve the efficiency and accuracy of the identification of the magnetic tape number.

[0050] It should be noted that when the image of the magnetic tape in the magnetic tape appearance image is tilted, the image can be adaptively rotated to the corresponding angle to ensure that the text in the magnetic tape image can be recognized when viewed from the front.

[0051] Optionally, in the magnetic tape information recognition method provided in this application embodiment, the image recognition model includes a first image recognition sub-model and multiple second image recognition sub-models. Recognizing the magnetic tape appearance image through the image recognition model to obtain the target organization to which the target magnetic tape belongs and the target model of the target magnetic tape includes: inputting the magnetic tape appearance image into the first image recognition sub-model to obtain the target organization to which the magnetic tape appearance image belongs, wherein the first image recognition sub-model is trained using multiple sample appearance images and the sample organization to which each sample appearance image belongs; determining the target recognition sub-model associated with the target organization from the multiple second image recognition sub-models; and inputting the magnetic tape appearance image into the target recognition sub-model to obtain the target model of the target magnetic tape, wherein the target recognition sub-model is trained using multiple sample appearance images and the sample model of each sample appearance image.

[0052] It should be noted that each sub-model can be set as an SVM (Support Vector Machine) model. Since the training samples required to identify the organization to which the target tape belongs and the model of the target tape are different, different models can be used to identify the organization and model respectively in order to ensure accurate identification of the organization and model, thereby improving the accuracy of identification.

[0053] Specifically, when determining the structure and model of the target magnetic tape, the target structure to which the magnetic tape appearance image belongs can first be obtained from the first image recognition sub-model. After determining the target structure, the target recognition sub-model corresponding to the target structure is determined, and the target model of the target magnetic tape is determined based on the target recognition sub-model. Thus, the structure and model of the target magnetic tape are determined through the two models respectively.

[0054] Figure 4 This is a flowchart of the optional geotrace information identification process provided according to the embodiments of this application, such as... Figure 4 As shown, Model 1 is the first image recognition sub-model, and Model 2 and Model 3 are the second image recognition sub-models. First, Model 1 is used to determine whether the target tape's structure is structure 1 or structure 2. After determining the structure, for example, if the target model's structure is structure 1, then Model 2 corresponding to structure 1 is used to determine whether the target tape's model is model 1 or model 2, thereby completing the accurate identification of the structure and model.

[0055] Optionally, in the magnetic tape information recognition method provided in this application embodiment, the sub-models in the image recognition model are trained in the following way: For each sub-model, a first sample data set associated with the sub-model is obtained, wherein the first sample data set is used to train the sub-model, wherein the sub-model includes a first image recognition sub-model or a second image recognition sub-model; M preset functions are obtained, and each function is used as a function in the sub-model in turn to obtain M initial sub-models; the first sample data set is input into each initial sub-model to obtain M sets of recognition results; the accuracy of each set of recognition results is calculated to obtain M accuracy rates, and the maximum value among the M accuracy rates is selected to obtain the first maximum accuracy rate, and the initial sub-model corresponding to the first maximum accuracy rate is determined as the sub-model applied in the image recognition model.

[0056] It should be noted that the differences between the first image recognition sub-model and the second image recognition sub-model, as well as between the second image recognition sub-model and the second image recognition sub-model, are not only due to differences in the training samples, but also to differences in the functions used in the models. That is, the function that maximizes the accuracy of each sub-model can be determined from among multiple functions based on the model recognition results, thereby improving the recognition accuracy of each sub-model. The function can be a kernel function, such as a linear kernel function, a polynomial kernel function, a Gaussian kernel function, etc.

[0057] Specifically, when selecting a function, the sample information corresponding to the model can be determined first. For example, when determining the first image recognition sub-model, the first sample data set can include images of magnetic tapes from multiple institutions, as well as the name of the institution corresponding to each image. After determining the first sample data set, multiple currently available functions can be added one by one to the sub-model of the function to be determined, resulting in M ​​initial sub-models. The M initial sub-models are then trained using the first sample data set. After training, the M initial sub-models are tested using a test set to obtain M institution recognition results. The recognition accuracy of each model is calculated based on the recognition results, and the sub-model with the highest accuracy is determined as the sub-model applied to the image recognition model.

[0058] Optionally, in the magnetic tape information recognition method provided in this application embodiment, before obtaining M preset functions, the method further includes: for each preset function, obtaining a second sample data set associated with the preset function, wherein the second sample data set is used to calculate the parameters of the preset function; setting the preset function as a function in a sub-model to obtain a first preset sub-model; randomly generating N sets of parameter values ​​for the preset function to obtain N sets of parameter values, and configuring each set of parameter values ​​in the first preset sub-model to obtain N second preset sub-models; sequentially inputting the second sample data into each second preset sub-model to obtain N sets of recognition results; calculating the accuracy of each set of recognition results to obtain N accuracy rates, and selecting the accuracy rate greater than the preset accuracy rate from the N accuracy rates to obtain P accuracy rates, and obtaining the parameter values ​​corresponding to the P accuracy rates to obtain P sets of parameter values; constructing a parameter value selection interval from the P sets of parameter values, and determining the parameter value with the highest accuracy in the parameter value selection interval using a genetic algorithm to obtain the target parameter value; and adding the target parameter value to the preset function.

[0059] Specifically, before obtaining M preset functions, it is necessary to determine that the parameters in each function are optimal. When selecting functions and determining function parameters, it is necessary to first randomly generate N sets of parameter values ​​for preset functions and configure the N sets of parameter values ​​in the sub-model containing the preset functions to obtain N second preset sub-models. In this way, the functions are tested in the sub-models to determine the optimal values ​​of the random parameters.

[0060] Each second preset sub-model is trained using the second sample dataset, and each trained second preset sub-model is tested using the test set to obtain N sets of recognition results. The accuracy of each second preset sub-model can then be determined based on the recognition results. The parameter with the highest accuracy is then determined as the optimal parameter of the preset function, thus completing the parameter configuration in the preset function.

[0061] Furthermore, after obtaining N sets of recognition results and determining the accuracy of each set, the accuracy rates greater than a preset accuracy rate can be selected from the N accuracy rates to obtain P accuracy rates. The parameter values ​​corresponding to these P accuracy rates can then be obtained, resulting in P sets of parameter values. These P sets of parameter values ​​constitute the parameter value selection range. Figure 5 This is a schematic diagram illustrating the distribution of optional accuracy values ​​according to embodiments of this application, such as... Figure 5 As shown, the preset accuracy can be 0.75. Then all points in interval a meet this requirement. Therefore, interval a is the range for parameter value selection. Here, the penalty factor and kernel parameter are both parameter values ​​in the function. The penalty factor represents the goodness of fit of the kernel function classification.

[0062] After determining the parameter value selection range, a genetic algorithm can be used to determine the parameter value with the highest accuracy within the parameter value selection range, and this parameter value can be determined as the optimal parameter value. This step-by-step determination of the optimal parameter value reduces the computational workload of obtaining the parameter value. Optionally, in the magnetic tape information recognition method provided in this application embodiment, determining the parameter value with the highest accuracy within the parameter value selection range using a genetic algorithm to obtain the target parameter value includes: selecting any parameter value within the parameter value selection range to obtain an initial parameter value; configuring the initial parameter value in a first preset sub-model to obtain a candidate sub-model; inputting second sample data into the candidate sub-model to obtain candidate results, and calculating the accuracy based on the candidate results to obtain the candidate accuracy; iteratively calculating the initial parameter value using a genetic algorithm to obtain an updated initial parameter value, wherein the updated initial parameter value is located within the parameter value selection range; repeatedly calculating the candidate accuracy based on the updated initial parameter value until the genetic algorithm completes H iterations to obtain H candidate accuracies; and determining the parameter value corresponding to the maximum candidate accuracy among the H candidate accuracies as the target parameter value.

[0063] Specifically, any parameter value can be selected from the parameter value selection range to obtain initial parameter values. These initial parameter values ​​are then configured in the first preset sub-model to obtain candidate sub-models. The candidate sub-models are trained to obtain training results and recognition accuracy. The initial parameter values ​​are iteratively calculated using a genetic algorithm to obtain updated initial parameter values. The above steps are repeated to obtain multiple recognition accuracies. After completing a preset number of iterations, the highest accuracy is obtained from the multiple recognition accuracies, and the parameter corresponding to this accuracy is determined as the parameter in the preset function, thereby completing the parameter configuration of the function in the first preset sub-model.

[0064] The above process can determine the optimal parameters of each function that can be set in any sub-model, thereby obtaining multiple optimal functions. Then, among the multiple optimal functions, the function that best matches the sub-model can be determined. Thus, different functions can be added to the sub-model according to different samples and application scenarios, thereby obtaining multiple image recognition sub-models.

[0065] It should be noted that the steps shown in the flowchart in the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions, and although a logical order is shown in the flowchart, in some cases the steps shown or described may be executed in a different order than that shown here.

[0066] This application also provides a magnetic tape information identification device. It should be noted that the magnetic tape information identification device of this application can be used to execute the magnetic tape information identification method provided in this application. The magnetic tape information identification device provided in this application is described below.

[0067] Figure 6 This is a schematic diagram of a magnetic tape information identification device provided according to an embodiment of this application. Figure 6 As shown, the device includes: a first acquisition unit 61, a second acquisition unit 62, an identification unit 63, and a sending unit 64.

[0068] The first acquisition unit 61 is used to acquire image information of the target magnetic tape, wherein the image information includes an image of the magnetic tape's appearance.

[0069] The second acquisition unit 62 is used to acquire the target image in the magnetic tape appearance image through a text recognition model, and to recognize the target image to obtain the magnetic tape number, wherein the target image includes the magnetic tape number.

[0070] The identification unit 63 is used to identify the appearance image of the magnetic tape through an image recognition model, and to obtain the target institution to which the target magnetic tape belongs and the target model of the target magnetic tape.

[0071] The sending unit 64 is used to send the tape number, target mechanism and target model to the user terminal corresponding to the target tape.

[0072] The magnetic tape information identification device provided in this application embodiment acquires image information of the target magnetic tape through a first acquisition unit 61, wherein the image information includes a picture of the magnetic tape's appearance; a second acquisition unit 62 acquires the target image in the picture of the magnetic tape's appearance through a text recognition model, and identifies the target image to obtain the magnetic tape number, wherein the target image includes the magnetic tape number; an identification unit 63 identifies the picture of the magnetic tape's appearance through an image recognition model to obtain the target organization to which the target magnetic tape belongs and the target model of the target magnetic tape; a sending unit 64 sends the magnetic tape number, target organization, and target model to the user terminal corresponding to the target magnetic tape, solving the problem of low efficiency in the related technology of distinguishing magnetic tapes by manual identification. By acquiring the image of the magnetic tape and identifying the magnetic tape number from the image, the number information is obtained. An image recognition model is trained through a machine learning model to identify the image of the magnetic tape, thereby obtaining information such as the organization and model of the magnetic tape that can be obtained from its appearance. The acquired information is then sent to the user terminal, thus achieving the effect of accurate and efficient identification and differentiation of magnetic tapes.

[0073] Optionally, in the magnetic tape information identification device provided in this application embodiment, the first acquisition unit 61 includes: a first identification module, used to identify whether the target magnetic tape is located at a preset position; a control module, used to control the camera to capture the target magnetic tape and obtain the current image of the target magnetic tape when the target magnetic tape is located at the preset position; a second identification module, used to identify the current image and determine whether there is a magnetic tape number in the current image; a first determination module, used to determine the current image as image information when there is a magnetic tape number in the current image; and an alarm module, used to issue an alarm message when there is no magnetic tape number in the current image, wherein the alarm message indicates that there is an abnormality in the captured interface of the target magnetic tape.

[0074] Optionally, in the magnetic tape information recognition device provided in this application embodiment, the second acquisition unit 62 includes: a second determining module, used to determine the position information of the magnetic tape number in the image information; a cropping module, used to crop the image where the magnetic tape number is located from the image information according to the position information to obtain a target image; and a first input module, used to input the target image into a text recognition model to obtain the magnetic tape number, wherein the text recognition model is trained through multiple sample number images and the sample numbers in each sample number image.

[0075] Optionally, in the magnetic tape information recognition device provided in this application embodiment, the image recognition model includes a first image recognition sub-model and multiple second image recognition sub-models. The recognition unit 63 includes: a second input module, used to input a magnetic tape appearance image into the first image recognition sub-model to obtain the target organization to which the magnetic tape appearance image belongs, wherein the first image recognition sub-model is trained through multiple sample appearance images and the sample organization to which each sample appearance image belongs; a third determination module, used to determine the target recognition sub-model associated with the target organization from the multiple second image recognition sub-models; and a third input module, used to input a magnetic tape appearance image into the target recognition sub-model to obtain the target model of the target magnetic tape, wherein the target recognition sub-model is trained through multiple sample appearance images and the sample model of each sample appearance image.

[0076] Optionally, in the magnetic tape information recognition device provided in this application embodiment, the sub-models in the image recognition model are trained in the following manner: a third acquisition unit is used to acquire a first sample data set associated with each sub-model, wherein the first sample data set is used to train the sub-model, and the sub-model includes a first image recognition sub-model or a second image recognition sub-model; a fourth acquisition unit is used to acquire M preset functions, and sequentially use each function as a function in the sub-model to obtain M initial sub-models; a first input unit is used to input the first sample data set into each initial sub-model to obtain M sets of recognition results; a first calculation unit is used to calculate the accuracy of each set of recognition results to obtain M accuracy rates, and select the maximum value among the M accuracy rates to obtain a first maximum accuracy rate, and determine the initial sub-model corresponding to the first maximum accuracy rate as the sub-model applied in the image recognition model.

[0077] Optionally, in the magnetic tape information recognition device provided in this application embodiment, before acquiring M preset functions, the device further includes: a fifth acquisition unit, used to acquire a second sample data set associated with each preset function, wherein the second sample data set is used to calculate the parameters of the preset function; a setting unit, used to set the preset function as a function in a sub-model to obtain a first preset sub-model; and a generation unit, used to randomly generate N sets of parameter values ​​for the preset functions to obtain N sets of parameter values, and configure each set of parameter values ​​in the first preset sub-model to obtain N second preset sub-models; The input unit is used to sequentially input the second sample data into each second preset sub-model to obtain N sets of recognition results; the second calculation unit is used to calculate the accuracy of each set of recognition results to obtain N accuracy rates, and select the accuracy rate that is greater than the preset accuracy rate from the N accuracy rates to obtain P accuracy rates, and obtain the parameter values ​​corresponding to the P accuracy rates to obtain P sets of parameter values; the determination unit is used to construct a parameter value selection interval from the P sets of parameter values, and determine the parameter value with the highest accuracy in the parameter value selection interval through a genetic algorithm to obtain the target parameter value; the addition unit is used to add the target parameter value to the preset function.

[0078] Optionally, in the magnetic tape information recognition device provided in this application embodiment, the determining unit includes: a selection module, used to select any parameter value in the parameter value selection range to obtain an initial parameter value; a configuration module, used to configure the initial parameter value in a first preset sub-model to obtain a candidate sub-model; a fourth input module, used to input second sample data into the candidate sub-model to obtain candidate results, and calculate the accuracy based on the candidate results to obtain a candidate accuracy; a first calculation module, used to iteratively calculate the initial parameter value according to a genetic algorithm to obtain an updated initial parameter value, wherein the updated initial parameter value is located in the parameter value selection range; a second calculation module, used to repeatedly calculate the candidate accuracy based on the updated initial parameter value until the genetic algorithm completes H iterations to obtain H candidate accuracies; and a fourth determining module, used to determine the parameter value corresponding to the maximum candidate accuracy among the H candidate accuracies as the target parameter value.

[0079] The aforementioned magnetic tape information identification device includes a processor and a memory. The first acquisition unit 61, the second acquisition unit 62, the identification unit 63, the sending unit 64, etc., are all stored in the memory as program units. The processor executes the aforementioned program units stored in the memory to realize the corresponding functions.

[0080] The processor contains a kernel, which retrieves the corresponding program units from memory. One or more kernels can be configured, and adjusting kernel parameters can address the inefficiency of manual tape identification methods in related technologies.

[0081] The memory may include non-permanent memory in computer-readable media, such as random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM, and the memory includes at least one memory chip.

[0082] This invention provides a computer-readable storage medium storing a program thereon, which, when executed by a processor, implements the magnetic tape information identification method.

[0083] This invention provides a processor for running a program, wherein the program executes the magnetic tape information identification method during runtime.

[0084] Figure 7 This is a schematic diagram of an electronic device provided according to an embodiment of this application, such as... Figure 7 As shown, this embodiment of the invention provides an electronic device 70, which includes a processor, a memory, and a program stored in the memory and executable on the processor. When the processor executes the program, it implements the steps in the above-described magnetic tape information identification method. The device described herein can be a server, PC, PAD, mobile phone, etc.

[0085] This application also provides a computer program product that, when executed on a data processing device, is adapted to perform a program that initializes the steps in the above-described magnetic tape information identification method.

[0086] Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0087] This application is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this application. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart... Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.

[0088] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.

[0089] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.

[0090] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.

[0091] Memory may include non-persistent memory in computer-readable media, such as random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM. Memory is an example of computer-readable media.

[0092] Computer-readable media includes both permanent and non-permanent, removable and non-removable media that can store information using any method or technology. Information can be computer-readable instructions, data structures, modules of programs, or other data. Examples of computer storage media include, but are not limited to, phase-change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, CD-ROM, digital versatile optical disc (DVD) or other optical storage, magnetic tape, magnetic disk storage or other magnetic storage devices, or any other non-transferable medium that can be used to store information accessible by a computing device. As defined herein, computer-readable media does not include transient computer-readable media, such as modulated data signals and carrier waves.

[0093] It should also be noted that the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such process, method, article, or apparatus. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes that element.

[0094] The above are merely embodiments of this application and are not intended to limit the scope of this application. Various modifications and variations can be made to this application by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the scope of the claims of this application.

Claims

1. A method for identifying magnetic tape information, characterized in that, include: Acquire image information of the target magnetic tape, wherein the image information includes an image of the tape's appearance; The target image in the magnetic tape appearance image is obtained by using a text recognition model, and the target image is recognized to obtain the magnetic tape number, wherein the target image includes the magnetic tape number; The image recognition model is used to identify the appearance image of the magnetic tape to obtain the target organization to which the target magnetic tape belongs and the target model of the target magnetic tape. Send the tape number, the target organization, and the target model to the user terminal corresponding to the target tape; The image recognition model includes a first image recognition sub-model and multiple second image recognition sub-models. The process of recognizing the magnetic tape appearance image using the image recognition model to obtain the target organization to which the target magnetic tape belongs and the target model of the target magnetic tape includes: inputting the magnetic tape appearance image into the first image recognition sub-model to obtain the target organization to which the magnetic tape appearance image belongs, wherein the first image recognition sub-model is trained using multiple sample appearance images and the sample organization to which each sample appearance image belongs; determining the target recognition sub-model associated with the target organization from the multiple second image recognition sub-models; and inputting the magnetic tape appearance image into the target recognition sub-model to obtain the target model of the target magnetic tape, wherein the target recognition sub-model is trained using multiple sample appearance images and the sample model of each sample appearance image. The sub-models in the image recognition model are trained as follows: For each sub-model, a first sample data set associated with the sub-model is obtained, wherein the first sample data set is used to train the sub-model, and the sub-model includes either the first image recognition sub-model or the second image recognition sub-model; M preset functions are obtained, and each function is used as a function in the sub-model in turn to obtain M initial sub-models; the first sample data set is input into each initial sub-model to obtain M sets of recognition results; the accuracy of each set of recognition results is calculated to obtain M accuracy rates, and the maximum value among the M accuracy rates is selected to obtain the first maximum accuracy rate, and the initial sub-model corresponding to the first maximum accuracy rate is determined as the sub-model applied in the image recognition model; Before obtaining M preset functions, the method further includes: for each preset function, obtaining a second sample data set associated with the preset function, wherein the second sample data set is used to calculate the parameters of the preset function; setting the preset function as a function in the sub-model to obtain a first preset sub-model; randomly generating N sets of parameter values ​​for the preset function to obtain N sets of parameter values, and configuring each set of parameter values ​​in the first preset sub-model to obtain N second preset sub-models; sequentially inputting the second sample data into each second preset sub-model to obtain N sets of recognition results; calculating the accuracy of each set of recognition results to obtain N accuracy rates, and selecting the accuracy rate greater than the preset accuracy rate from the N accuracy rates to obtain P accuracy rates, and obtaining the parameter values ​​corresponding to the P accuracy rates to obtain P sets of parameter values; constructing a parameter value selection interval from the P sets of parameter values, and determining the parameter value with the largest accuracy rate in the parameter value selection interval using a genetic algorithm to obtain a target parameter value; adding the target parameter value to the preset function. The method of determining the target parameter value by using a genetic algorithm to select the parameter value with the highest accuracy within the parameter value selection interval includes: selecting any parameter value within the parameter value selection interval to obtain an initial parameter value; configuring the initial parameter value in the first preset sub-model to obtain a candidate sub-model; inputting the second sample data into the candidate sub-model to obtain candidate results, and calculating the accuracy based on the candidate results to obtain a candidate accuracy; iteratively calculating the initial parameter value using the genetic algorithm to obtain an updated initial parameter value, wherein the updated initial parameter value is located within the parameter value selection interval; repeatedly calculating the candidate accuracy based on the updated initial parameter value until the genetic algorithm completes H iterations to obtain H candidate accuracies; and determining the parameter value corresponding to the maximum candidate accuracy among the H candidate accuracies as the target parameter value.

2. The method according to claim 1, characterized in that, The image information of the target magnetic tape obtained includes: Identify whether the target magnetic tape is located at a preset position; When the target tape is located at the preset position, the camera is controlled to capture an image of the target tape to obtain the current image of the target tape. Identify the current image and determine whether the magnetic tape number exists in the current image; If the magnetic tape number exists in the current image, the current image is identified as the image information; If the tape number is not present in the current image, an alarm message is issued, wherein the alarm message indicates that there is an anomaly on the captured interface of the target tape.

3. The method according to claim 1, characterized in that, The target image in the magnetic tape appearance image is obtained through a text recognition model, and the magnetic tape number is obtained by recognizing the target image. Determine the position information of the magnetic tape number in the image information; The target image is obtained by extracting the image containing the tape number from the image information based on the location information; The target image is input into the character recognition model to obtain the tape number, wherein the character recognition model is trained by multiple sample number images and the sample numbers in each sample number image.

4. A magnetic tape information identification device, characterized in that, include: The first acquisition unit is used to acquire image information of the target magnetic tape, wherein the image information includes an image of the magnetic tape's appearance; The second acquisition unit is used to acquire the target image in the magnetic tape appearance image through a text recognition model, and to recognize the target image to obtain the magnetic tape number, wherein the target image includes the magnetic tape number; The identification unit is used to identify the appearance image of the magnetic tape through an image recognition model, and to obtain the target organization to which the target magnetic tape belongs and the target model of the target magnetic tape. A sending unit is used to send the tape number, the target mechanism, and the target model to the user terminal corresponding to the target tape. The image recognition model includes a first image recognition sub-model and multiple second image recognition sub-models. The recognition unit includes: a second input module for inputting the magnetic tape appearance image into the first image recognition sub-model to obtain the target organization to which the magnetic tape appearance image belongs, wherein the first image recognition sub-model is trained using multiple sample appearance images and the sample organization to which each sample appearance image belongs; a third determination module for determining the target recognition sub-model associated with the target organization from the multiple second image recognition sub-models; and a third input module for inputting the magnetic tape appearance image into the target recognition sub-model to obtain the target model of the target magnetic tape, wherein the target recognition sub-model is trained using multiple sample appearance images and the sample model of each sample appearance image. The sub-models in the image recognition model are trained in the following way: a third acquisition unit is used to acquire a first sample data set associated with each sub-model, wherein the first sample data set is used to train the sub-model, and the sub-model includes the first image recognition sub-model or the second image recognition sub-model; a fourth acquisition unit is used to acquire M preset functions, and sequentially use each function as a function in the sub-model to obtain M initial sub-models; a first input unit is used to input the first sample data set into each initial sub-model to obtain M sets of recognition results; a first calculation unit is used to calculate the accuracy of each set of recognition results to obtain M accuracy rates, and select the maximum value among the M accuracy rates to obtain a first maximum accuracy rate, and determine the initial sub-model corresponding to the first maximum accuracy rate as the sub-model applied in the image recognition model; Before acquiring M preset functions, the device further includes: a fifth acquisition unit, configured to acquire a second sample data set associated with each preset function, wherein the second sample data set is used to calculate the parameters of the preset function; a setting unit, configured to set the preset function as a function in the sub-model to obtain a first preset sub-model; a generation unit, configured to randomly generate N sets of parameter values ​​for the preset functions to obtain N sets of parameter values, and configure each set of parameter values ​​in the first preset sub-model to obtain N second preset sub-models; and a second input unit, configured to input the second sample data set into the first preset sub-model. The data is sequentially input into each second preset sub-model to obtain N sets of recognition results; the second calculation unit is used to calculate the accuracy of each set of recognition results, obtain N accuracy rates, select the accuracy rate greater than the preset accuracy rate among the N accuracy rates to obtain P accuracy rates, and obtain the parameter values ​​corresponding to the P accuracy rates to obtain P sets of parameter values; the determination unit is used to construct a parameter value selection interval from the P sets of parameter values, and determine the parameter value with the largest accuracy rate in the parameter value selection interval through a genetic algorithm to obtain the target parameter value; the addition unit is used to add the target parameter value to the preset function; The determining unit includes: a selection module, used to select any parameter value from the parameter value selection range to obtain an initial parameter value; a configuration module, used to configure the initial parameter value in the first preset sub-model to obtain a candidate sub-model; a fourth input module, used to input the second sample data into the candidate sub-model to obtain a candidate result, and calculate the accuracy based on the candidate result to obtain a candidate accuracy; a first calculation module, used to iteratively calculate the initial parameter value according to the genetic algorithm to obtain an updated initial parameter value, wherein the updated initial parameter value is located in the parameter value selection range; a second calculation module, used to repeatedly calculate the candidate accuracy based on the updated initial parameter value until the genetic algorithm completes H iterations to obtain H candidate accuracies; and a fourth determining module, used to determine the parameter value corresponding to the maximum candidate accuracy among the H candidate accuracies as the target parameter value.

5. A computer storage medium, characterized in that, The computer storage medium is used to store a program, wherein the program, when running, controls the device where the computer storage medium is located to execute the magnetic tape information identification method according to any one of claims 1 to 3.

6. An electronic device, characterized in that, It includes one or more processors and a memory, the memory being used to store one or more programs, wherein when the one or more programs are executed by the one or more processors, the one or more processors cause the one or more processors to implement the magnetic tape information identification method according to any one of claims 1 to 3.

Citation Information

Patent Citations

  • Conveying device and conveying system

    CN113800253A

  • OCR (Optical Character Recognition) method and device, processor and electronic equipment

    CN115063798A