Method for determining device identification of a shared device and server

By segmenting and correcting the identification codes and character sequence images of shared devices, and combining edge detection and character recognition models, the problems of large errors and low accuracy in the identification of shared bicycle devices have been solved, achieving efficient and accurate device management.

CN114792419BActive Publication Date: 2025-11-25SHANGHAI JUNZHENG NETWORK TECH CO LTD
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
CN202210241939.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-03-11
Publication Date
2025-11-25
Estimated Expiration
2042-03-11

AI Technical Summary

Technical Problem

Existing technologies suffer from large errors and low accuracy when identifying shared bicycle equipment identifiers, resulting in low efficiency in shared bicycle management.

Method used

By acquiring the target image, sub-images containing the identification code and the identification character sequence are segmented. The identification code is processed using edge detection and perspective correction algorithms, and the identification character sequence is identified using a character recognition model to determine the device identifier of the shared device.

Benefits of technology

It improves the recognition accuracy and efficiency of shared device identification, reduces recognition errors, and supports efficient shared device management.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114792419B_ABST
    Figure CN114792419B_ABST
Patent Text Reader

Abstract

The present specification provides a method for determining a device identity of a shared device and a server. After a target picture containing a target shared device is acquired, a first sub-picture containing an identity code and a second sub-picture containing an identity character sequence are segmented from the target picture respectively. Then, the first sub-picture and the second sub-picture are processed respectively to obtain a corresponding first identity character sequence and a second identity character sequence. Finally, the device identity of the target shared device is determined according to the first identity character sequence and the second identity character sequence. Thus, the device identity of the shared device in the picture can be accurately and efficiently determined, the recognition error is reduced, and the recognition accuracy is improved.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present specification belongs to the technical field of Internet, and particularly relates to a method for determining a device identifier of a shared device and a server. BACKGROUND

[0002] At present, for a large number of shared bicycles that have been put into use, the platform party usually needs to arrange maintenance personnel to take pictures of the shared bicycles offline, and then identify and determine the device identifier of the shared bicycles according to the pictures, so as to perform corresponding offline maintenance and management on the shared bicycles put into use.

[0003] However, based on the existing method, there are technical problems such as large error and low precision when identifying and determining the device identifier of the shared bicycle.

[0004] At present, no effective solution has been proposed for the above technical problems. SUMMARY

[0005] The present specification provides a method for determining a device identifier of a shared device and a server, which can accurately and efficiently identify and determine the device identifier of the shared device in the picture, reduce the identification error, and improve the identification precision.

[0006] The embodiment of the present specification provides a method for determining a device identifier of a shared device, comprising: obtaining a target picture containing a target shared device; segmenting a first sub-picture and a second sub-picture from the target picture; wherein the first sub-picture contains an identification code arranged on the target shared device; the second sub-picture contains an identification character sequence of the target shared device; processing the first sub-picture to obtain a first identification character sequence; processing the second sub-picture to obtain a second identification character sequence; determining the device identifier of the target shared device according to the first identification character sequence and the second identification character sequence.

[0007] The embodiment of the present specification also provides a method for obtaining an identification character sequence, comprising: detecting the edge contour of a first target picture based on an edge detection algorithm to obtain an edge detection result; wherein the first target picture contains at least an identification code; segmenting a local picture containing the identification code from the first target picture according to the edge detection result; performing position transformation on the pixel points in the local picture to obtain a corrected local picture; performing analysis processing on the identification code in the corrected picture to obtain an identification character sequence corresponding to the identification code.

[0008] The embodiment of the present specification further provides an acquisition method of an identification character sequence, comprising: extracting a corresponding image feature from a second target picture, and determining a first character sequence according to the image feature; wherein the second target picture at least contains the identification character sequence; detecting whether a reverse identifier exists in the first character sequence; in a case where it is determined that the reverse identifier exists in the first character sequence, performing a preset correction processing on the first character sequence to obtain a corresponding second character sequence as the identification character sequence.

[0009] The embodiment of the present specification further provides a determination method of a device identification of a sharing device, comprising: acquiring a target picture containing a target sharing device; performing a correction processing on a first sub-picture containing an identification code obtained based on the target picture to obtain a corrected picture; performing an analysis processing on the identification code in the corrected picture to obtain an identification character sequence corresponding to the identification code; in a case where the analysis processing on the identification code in the corrected picture fails, the method further comprises: performing an identification on a second sub-picture containing the identification character sequence obtained based on the target picture to acquire the identification character sequence.

[0010] The embodiment of the present specification further provides a server, comprising a processor and a memory for storing processor-executable instructions, wherein the processor executes the instructions to implement the related steps of the determination method of the device identification of the sharing device or the acquisition method of the identification character sequence.

[0011] Based on the determination method of the device identification of the sharing device and the server provided in the present specification, after acquiring a target picture containing a target sharing device, a first sub-picture containing an identification code and a second sub-picture containing an identification character sequence can be segmented from the target picture respectively; then by processing the first sub-picture and the second sub-picture respectively, a first identification character sequence and a second identification character sequence are obtained; and then according to the first identification character sequence and the second identification character sequence, the device identification of the target sharing device is determined. Therefore, the device identification of the sharing device in the picture can be accurately and efficiently identified and determined, the identification error is reduced, and the identification precision is improved. BRIEF DESCRIPTION OF DRAWINGS

[0012] In order to more clearly illustrate the embodiments of the present specification, the drawings required to be used in the embodiments will be briefly introduced as follows, and the drawings in the following description are only some embodiments described in the present specification, and for ordinary skilled in the art, other drawings can also be obtained without creative labor on the basis of these drawings.

[0013] Figure 1 is a schematic diagram of an embodiment of the structural composition of the system applying the determination method of the device identification of the sharing device provided by the present specification;

[0014] Figure 2 is a schematic diagram of an embodiment of the method for determining the device identity of the shared device provided by the embodiments of the present specification in one scenario example;

[0015] Figure 3 is a flowchart of the method for determining the device identity of the shared device provided by one embodiment of the present specification;

[0016] Figure 4 is a schematic diagram of an embodiment of the method for determining the device identity of the shared device provided by the embodiments of the present specification in one scenario example;

[0017] Figure 5 is a schematic diagram of an embodiment of the method for determining the device identity of the shared device provided by the embodiments of the present specification in one scenario example;

[0018] Figure 6 is a schematic diagram of an embodiment of the method for determining the device identity of the shared device provided by the embodiments of the present specification in one scenario example;

[0019] Figure 7 is a schematic diagram of an embodiment of the method for determining the device identity of the shared device provided by the embodiments of the present specification in one scenario example;

[0020] Figure 8 is a schematic diagram of an embodiment of the method for determining the device identity of the shared device provided by the embodiments of the present specification in one scenario example;

[0021] Figure 9 is a flowchart of the method for obtaining the identity character sequence provided by one embodiment of the present specification;

[0022] Figure 10 is a flowchart of the method for obtaining the identity character sequence provided by one embodiment of the present specification;

[0023] Figure 11 is a schematic diagram of the structure of the server provided by one embodiment of the present specification;

[0024] Figure 12 is a schematic diagram of the structure of the device identity determination apparatus of the shared device provided by one embodiment of the present specification;

[0025] Figure 13 is a schematic diagram of the structure of the identity sequence acquisition determination apparatus provided by one embodiment of the present specification;

[0026] Figure 14is a structural component schematic diagram of the acquisition determination device of the identification sequence provided by an embodiment of the present specification. DETAILED DESCRIPTION

[0027] In order for those skilled in the art to better understand the technical solutions in the present specification, the technical solutions in the present specification will be clearly and completely described below in combination with the drawings in the embodiments of the present specification. Obviously, the described embodiments are only part of the embodiments of the present specification, not all. Based on the embodiments in the present specification, all other embodiments obtained by those skilled in the art without creative labor should belong to the scope of protection of the present specification.

[0028] The embodiments of the present specification provide a determination method of device identification of a shared device. The method can be applied to a system including a server and a terminal device. Based on the system, the maintenance and management of offline shared devices can be realized. Please refer to Figure 1 as shown.

[0029] In the present embodiment, the server can specifically include a background server applied to the side of a shared device management platform, capable of realizing data transmission, data processing and the like. Specifically, the server may, for example, be an electronic device with data operation, storage and network interaction functions. Alternatively, the server may also be a software program running in the electronic device to provide support for data processing, storage and network interaction. In the present embodiment, the number of servers is not specifically limited. The server can be one server, several servers, or a server cluster formed by several servers.

[0030] In the present embodiment, the terminal device can specifically include a front end applied to the side of a maintenance personnel responsible for the offline maintenance and management of shared devices, capable of realizing data acquisition, data transmission and the like. Specifically, the terminal device may, for example, be an electronic device such as a tablet computer with a camera, a smart phone, an inspection instrument and the like. Alternatively, the terminal device may also be a software application capable of running in the above-mentioned electronic device. For example, it can be an APP running on a smart phone and the like.

[0031] In some embodiments, the shared device can specifically include a shared riding device, such as a shared bicycle, a shared electric vehicle, a shared car and the like. In addition, according to specific application scenarios and processing requirements, the above-mentioned shared device can also include other types of shared devices, such as a shared printer, a shared battery and the like.

[0032] In some embodiments, an identification code and an identification character sequence are also pre-arranged on the shared device. Specifically, please refer to Figure 2The identification character sequence is used to represent the device identification of the sharing device, and the identification code contains the device identification to be parsed and extracted. The identification code corresponds to the sharing device one by one.

[0033] In a specific implementation, the identification code and the identification character sequence can be arranged at the same or adjacent positions outside the sharing device, so that the maintenance personnel can shoot the identification code and the identification character sequence into the same picture when collecting the picture containing the sharing device.

[0034] Referring to Figure 3 For the server side, the method for determining the device identification of the sharing device provided by the embodiments of the present specification can include the following content in a specific implementation.

[0035] S301: obtaining a target picture containing a target sharing device;

[0036] S302: segmenting a first sub-picture and a second sub-picture from the target picture; wherein the first sub-picture contains an identification code arranged on the target sharing device; and the second sub-picture contains an identification character sequence of the target sharing device;

[0037] S303: processing the first sub-picture to obtain a first identification character sequence; and processing the second sub-picture to obtain a second identification character sequence;

[0038] S304: determining the device identification of the target sharing device according to the first identification character sequence and the second identification character sequence.

[0039] In some embodiments, the above-mentioned target sharing device can be specifically understood as a sharing device whose device identification is to be obtained. The above-mentioned target picture can be specifically a picture containing the target sharing device.

[0040] Specifically, referring to Figure 1 As shown in the figure, the maintenance personnel can use the terminal device to collect the target picture by shooting the target sharing device, and then send the target picture to the server through the network. Correspondingly, the server can obtain the target picture.

[0041] When collecting the target picture, the maintenance personnel can not need to shoot the complete target sharing device, but only need to shoot the local area of the target sharing device where the identification code and the identification character sequence are arranged, so that the collected target picture at least contains the identification code and the identification character sequence on the target sharing device. For example, referring to Figure 4 As shown in the figure,

[0042] In some embodiments, the identification code can specifically include a two-dimensional code and the like. The identification character sequence can specifically include a numerical character sequence and the like. It should be noted that the above-mentioned two-dimensional code and numerical character sequence are only illustrative. In actual implementation, according to specific application scenarios and processing requirements, the identification code can also include other types of identification codes such as a bar code. The identification character sequence can also include other types of identification character sequences such as a character sub-character sequence. Hereinafter, the identification code is taken as a two-dimensional code, and the identification character sequence is taken as a numerical character sequence as an example for specific description. For the case of using other types of identification codes and / or other types of identification character sequences, reference can be made to the following embodiments using a two-dimensional code as the identification code and using a numerical character sequence as the identification character sequence. This specification will not be repeated.

[0043] In some embodiments, the above-mentioned segmentation of the first sub-picture and the second sub-picture from the target picture can specifically include the following contents:

[0044] S1: processing the target picture by using a target detection model to obtain first coordinate information of an image region containing the identification code and second coordinate information of an image region containing the identification character sequence;

[0045] S2: segmenting a first sub-picture from the target picture according to the first coordinate information; and segmenting a second sub-picture from the target picture according to the second coordinate information.

[0046] In some embodiments, the above-mentioned first sub-picture can be specifically understood as a local picture of the image region (for example, the ROI region of the identification code) containing the identification code in the target picture. The above-mentioned second sub-picture can be specifically understood as a local picture of the image region (for example, the ROI region of the identification character sequence) containing the identification character sequence in the target picture.

[0047] In some embodiments, the above-mentioned target detection model can be specifically understood as a neural network model obtained by pre-deep learning training. Based on the target detection model, the image region containing the identification code and the image region containing the identification character sequence in the picture can be detected, and the coordinate information of the image region containing the identification code in the picture and the coordinate information of the image region containing the identification character sequence in the picture can be outputted.

[0048] In some embodiments, the target detection model can be used to pre-process the input target picture. The pre-processing can include one or more of the following: noise reduction processing, filtering processing, and feature extraction, segmentation, and matching of the input target picture. The convolutional network in the target detection model is then used to extract the corresponding image features. The target detection model is then used to process the image features to predict and output the coordinate information of the image region containing the identification code in the picture (first coordinate information) and the coordinate information of the image region containing the identification character sequence in the picture (second coordinate information). Then, the first sub-picture can be segmented from the target picture according to the first coordinate information, and the second sub-picture can be segmented from the target picture according to the second coordinate information.

[0049] In some embodiments, for a first sub-picture in good condition (e.g., a picture containing a small deformation, a correct position, or a clear identification code), the identification code in the first sub-picture can be analyzed to obtain the data information implied in the identification code as the first identification character sequence corresponding to the identification code.

[0050] For a first sub-picture in poor condition (e.g., a picture containing a large deformation, a tilted position, or a blurred identification code), the first sub-picture can be corrected based on the perspective mechanism, and then the identification code in the corrected picture can be analyzed to accurately obtain the first identification character sequence corresponding to the identification code.

[0051] In some embodiments, the first sub-picture can be processed to obtain the first identification character sequence, which can include the following: analyzing the identification code in the first sub-picture; and obtaining the first identification character sequence corresponding to the identification code if the analysis is successful.

[0052] The method can further include, in the case of a failed analysis, correcting the first sub-picture based on the perspective mechanism to obtain a corrected picture, and analyzing the identification code in the corrected picture to obtain the first identification character sequence corresponding to the identification code. For details, please refer to Figure 6

[0053] In some embodiments, the identification code in the first sub-picture can be analyzed first. If the analysis is successful, it indicates that the identification code in the first sub-picture is in good condition, and the first identification character sequence can be directly obtained. Conversely, if the analysis fails, it indicates that the identification code in the first sub-picture is in poor condition, and the first identification character sequence cannot be directly obtained, and the first sub-picture needs to be corrected.

[0054] ​In some embodiments, during implementation, the state of the identifier code in the first sub-image can be detected first. If the identifier code is found to be slightly deformed, correctly positioned, or relatively clear, the identifier code in the first sub-image can be directly parsed. Conversely, if the identifier code is found to be significantly deformed, tilted, or blurry, the first sub-image can be corrected first, and then the corrected image can be parsed.

[0055] In some embodiments, the first sub-image can be specifically corrected based on perspective theory. The above-described correction of the first sub-image may specifically include the following:

[0056] S1: Detect the edge contour of the first sub-image based on the edge detection algorithm to obtain the edge detection result;

[0057] S2: Based on the edge detection results, determine the key point region of the identifier code in the first sub-image;

[0058] S3: Based on the key point region of the identifier code, segment out the local image containing the identifier code from the first sub-image;

[0059] S4: Perform position transformation on the pixels in the local image to obtain the first corrected local image.

[0060] In some embodiments, see Figure 4 As shown, the key point area mentioned above can be specifically understood as the endpoint areas of three squares located at the top left, top right, and bottom left corners of the identification code.

[0061] In some embodiments, during specific implementation, an edge detection algorithm can be used to traverse and search for contour edges in the first sub-image, and edges with a nested contour layer number greater than 4 can be identified as the edge detection result. Here, the aforementioned contour layer number is a definition in OpenCV, and edges with a nested contour layer number greater than 4 correspond to the endpoint regions of the three squares located at the top left, top right, and bottom left corners of the identifier code, respectively, thus determining the three key point regions of the identifier code in the first sub-image.

[0062] In some embodiments, see Figure 5 As shown, based on the three key point regions mentioned above, the smallest rectangle that can enclose the first sub-image can be calculated. Figure 5 The rectangle marked with a dashed line in the image is used to further determine the local image region where the identifier is located from the first sub-image, so that a smaller and more refined local image containing the identifier can be segmented from the first sub-image.

[0063] In some embodiments, the position transformation of the pixels in the local picture to obtain the first corrected local picture can include the following contents:

[0064] S1: determining the center coordinates of the corresponding virtual point region according to the center coordinates of the key point region;

[0065] S2: determining the position transformation matrix according to the center coordinates of the key point region and the center coordinates of the virtual point region;

[0066] S3: using the position transformation matrix to perform position transformation on the pixels in the region surrounded by the center of the key point region and the center of the virtual point region in the local picture to obtain the first corrected local picture.

[0067] Through the above embodiments, the local picture can be corrected based on the perspective mechanism to improve the subsequent identification code parsing rate, so that the first identification character sequence corresponding to the identification code can be parsed from the identification code based on the above-mentioned first corrected local picture with good effect.

[0068] In some embodiments, the center (or centroid) coordinates of the three key point regions in the local picture can be used to calculate the center coordinates of the right lower corner position endpoint region as the center coordinates of the virtual point region.

[0069] Specifically, refer to Figure 5 As shown in the figure, first form a triangle by connecting the centers of the three key point regions in the local picture, and then determine a quadrilateral corner point as the center of the virtual point by supplementing and correcting the right side edge.

[0070] Further, the corresponding transformation matrix can be calculated according to the center coordinates of the key point region and the center coordinates of the virtual point region in combination with the center coordinates of the standard key point (corresponding to the corrected key point and virtual point) region, which can be specifically expressed in the following form:

[0071]

[0072] T2=[a 13 a 23 ] T ,T3=[a 31 a 32 ]

[0073] Wherein, T1 represents image linear transformation, T2 represents image perspective transformation, and T3 represents image translation.

[0074] In some embodiments, in the above-mentioned position transformation of the pixel points in the region surrounded by the center of the key point region and the center of the virtual point region in the local picture, in actual implementation, the position transformation of each pixel point in the region surrounded by the center of the key point region and the center of the virtual point region in the local picture can be performed according to the following formula:

[0075]

[0076] wherein (u, v) represents the coordinates of any pixel point in the region surrounded by the center of the key point region and the center of the virtual point region in the local picture, (x = x' / w', y = y' / w') is the coordinates of the pixel point after the position transformation. w and w' are constants, and w can be 1.

[0077] Further, x and y can be specifically represented in the following form:

[0078]

[0079]

[0080] In some embodiments, before the correction processing of the first sub-picture, the first sub-picture can be further subjected to Gaussian filtering processing to improve the image quality of the first sub-picture, so that the identification code in the first sub-picture is relatively clearer and easier to be parsed.

[0081] In some embodiments, in actual implementation, the first sub-picture can be subjected to Gaussian filtering processing according to the following window template of Gaussian filtering:

[0082]

[0083] wherein H i,j represents the value at the position (i, j) in the window template, σ represents the standard deviation of Gaussian distribution, and the window template size is (2k+1)*(2k+1).

[0084] wherein the above-mentioned σ can reflect the discrete degree of data. If σ is small, the center coefficient of the generated window template is large, and the surrounding coefficients are small, and the smoothing effect obtained by processing the image based on such a window template is relatively not obvious. On the contrary, if σ is large, the difference between each coefficient of the generated window template is not large, and the smoothing effect obtained by processing the image based on such a window template is relatively obvious.

[0085] In some embodiments, in order to further improve the resolution effect of the corrected picture, after the position transformation matrix is used to perform position transformation on the pixel points in the region surrounded by the center of the key point region and the center of the virtual point region in the local picture, to obtain a first corrected local picture, the method can further include: performing a second correction process on the first corrected local picture to obtain a second corrected local picture as the corrected picture; wherein the second correction process includes at least one of color and light correction, gamma correction, and HDR-based color compensation correction.

[0086] Specifically, referring to FIG. 1, the first corrected local picture can be subjected to color and light correction, or gamma correction, or HDR-based color compensation correction, to obtain a second corrected local picture with relatively better effect and more suitable for resolution. Figure 6

[0087] For example, the first corrected local picture can be subjected to color and light correction to obtain a second corrected local picture 1, subjected to gamma correction to obtain a second corrected local picture 2, and subjected to HDR-based color compensation correction to obtain a second corrected local picture 3.

[0088] Further, the three second corrected local pictures can be sequentially subjected to resolution processing.

[0089] For example, the identification code in the second corrected local picture 1 can be subjected to resolution processing, and if the resolution is successful, a first identification character sequence can be obtained, and then the second corrected local picture 2 and the third corrected local picture 3 can be stopped from being subjected to resolution processing. Conversely, if the resolution fails, the identification code in the second corrected local picture 2 can be subjected to resolution processing, and if the resolution is successful, the first identification character sequence can be obtained, and then the third corrected local picture 3 can be stopped from being subjected to resolution processing. If the resolution fails, the identification code in the third corrected local picture 3 can be subjected to resolution processing.

[0090] In some embodiments, the color and light correction of the first corrected local picture can include the following: converting the first corrected local picture into a grayscale image, then performing nonlinear stretching on the grayscale image, and using a corresponding transformation formula to redistribute the grayscale image pixel values, so that the number of pixel values in a certain grayscale range is approximately equal, to obtain a second corrected local picture.

[0091] The transformation formula can be expressed as follows:

[0092]

[0093]

[0094] Where, r k This represents the gray level numbered k out of the eight gray levels in a grayscale image, where n is the gray level. k P represents the frequency of occurrence of each gray level. r (r k S represents the probability of each gray level occurring. k This represents the cumulative probability.

[0095] In some embodiments, the above-described gamma correction of the first corrected local image may specifically include the following: calculating the mean gamma value of the image in the first corrected local image and constructing a mapping table; and performing gamma correction on the first corrected local image according to the mapping table.

[0096] Specifically, the mean gamma value of the image in the first corrected local image can be calculated using the following formula:

[0097]

[0098]

[0099] Where, m i This represents the value of pixel number i in the first corrected local image, and n represents the number of pixels in the first corrected local image.

[0100] Specifically, the mapping relationship can be constructed according to the following formula:

[0101]

[0102] By correcting the local image after the first correction through the above embodiments, the color of the dark grayscale can be improved, the color error of each grayscale can be reduced, the transparency can be increased, and the resolution of the identification code in the image can be improved.

[0103] In some embodiments, the above-described HDR-based color compensation correction of the first corrected local image may include the following: first, converting the first corrected local image from an RGB image to a YUV space; then, separating the channels and performing brightness correction on the Y channel component; and then converting the brightness-corrected image back from the YUV space to an RGB image.

[0104] In practice, the brightness-corrected image can be converted back from the YUV space to an RGB image using the following formula:

[0105]

[0106]

[0107]

[0108] Where R, G, B, Y and R', G', B', Y' represent the channel components of the RGB image before and after the transformation, and the Y channel component of the YUV space, respectively. The Y channel represents the image brightness.

[0109] In some embodiments, image recognition can be performed on the identifier character sequence contained in the second sub-image to obtain the corresponding second identifier character sequence.

[0110] In some embodiments, the above-described processing of the second sub-image to obtain the second identifier character sequence may specifically include the following: processing the second sub-image using a character recognition model to obtain the second identifier character sequence.

[0111] Specifically, the character recognition model can be understood as a pre-trained model that can recognize digit characters in an image, as well as the inverted state of the digit characters, and output an accurate sequence of digit characters based on the inverted state of the digit characters.

[0112] In some embodiments, the above character recognition model can be trained in the following manner:

[0113] S1: Acquire sample images;

[0114] S2: Based on the character type and inversion state of the characters in the sample image, annotate the sample image to obtain the annotated sample image;

[0115] S3: Use the labeled sample images to train the model and obtain the character recognition model.

[0116] Specifically, the aforementioned sample image can be an image containing at least an identifier code and an identifier character sequence. Furthermore, the aforementioned sample image also includes an image in which the identifier character sequence is inverted (see [reference]). Figure 7 (as shown), and an image containing the sequence of identifier characters in a non-inverted (or forward) state (see image). Figure 8 (As shown).

[0117] In the case of identifying the character sequence as a numeric character sequence, considering that the numeric character in the non-reversed state can specifically include the following 10 different numeric character types: "0", "1", "2", "3", "4", "5", "6", "7", "8", "9"; which can correspond to the following labeled symbols respectively: "0", "1", "2", "3", "4", "5", "6", "7", "8", "9".

[0118] It is also considered that there are differences in the identification of different numeric characters in the reversed state. Specifically, "9" in the reversed state will be identified as "6", "6" in the reversed state will be identified as "9", and "0" in the reversed state will still be identified as "0". That is, only the above three numeric characters among the nine numeric characters will be identified as some existing numeric character type in the non-reversed state when in the reversed state.

[0119] Based on the above considerations, only the following 7 numeric character types can be considered for numeric characters in the non-reversed state: "1", "2", "3", "4", "5", "7", "8"; which can correspond to the following labeled symbols respectively: "-1", "-2", "-3", "-4", "-5", "-7", "-8". Among them, the symbol "-" is a reversed identifier.

[0120] In the above manner, the identification of numeric characters in the reversed state and the non-reversed state can be comprehensively considered, and the numeric character types that the model needs to identify can be sorted into the above 17 different types. The corresponding labeled symbols can be denoted as: {-8, -7, -5, -4, -3, -2, -1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9}.

[0121] When performing labeling, the reversed state of the identification character sequence contained in the sample image can be distinguished according to the above classification method and labeling rule, and each numeric character contained in the identification character sequence in the sample image can be labeled to obtain a labeled sample image.

[0122] Further, the labeled sample image can be divided into a training set and a test set according to a certain proportion. An initial model is constructed, wherein the initial model at least includes structures such as convolution layers, pooling layers, and BN layers.

[0123] The initial model is trained using the training set, and the trained model is tested using the test set to obtain a test result. In the case where the test result meets the preset accuracy requirement, the training is stopped, and a character recognition model meeting the requirement is obtained.

[0124] In some embodiments, the processing of the second sub-picture by the character recognition model to obtain the second sequence of identified characters can include the following steps.

[0125] S1: extracting image features from the second sub-picture by the character recognition model, and outputting a first sequence of characters according to the image features;

[0126] S2: detecting whether there is a reverse identifier in the first sequence of characters;

[0127] S3: in the case where it is determined that there is a reverse identifier in the first sequence of characters, performing a preset correction process on the first sequence of characters to obtain a second sequence of characters as the second sequence of identified characters.

[0128] In some embodiments, when processing the second sub-picture by the character recognition model, the feature map can be extracted by the character recognition model first, and then the region generation network in the character recognition model can be used to process the feature map to output a plurality of candidate regions that may contain a certain to-be-recognized numerical character, and the region generation network can give a corresponding foreground confidence (i.e., the probability of containing a numerical character in the candidate region). Then, according to the foreground confidence, the top M candidate regions in the confidence ranking can be selected from the plurality of candidate regions. The image features in the above M candidate regions can be extracted and recognized by the corresponding network structure in the character recognition model to obtain the first sequence of characters. Wherein, M is a positive integer greater than 0.

[0129] In some embodiments, considering that the sliding step of the convolutional network in the character recognition model is relatively small, a numerical character can be contained in many candidate regions, and therefore there can be many redundant regions in the above M candidate regions. In this case, if the above M candidate regions are all sent to the subsequent network structure for processing without distinction, the redundant calculation amount will inevitably be increased, which will affect the overall processing efficiency.

[0130] Based on the above consideration, after the M candidate regions are determined, the NMS (Non-Maximum Suppression) operation can be performed to filter out some redundant regions from the M candidate regions.

[0131] Specifically, a candidate region with the highest foreground confidence can be selected first, and then the candidate regions with an overlap (measured by IOU) greater than a preset threshold with the candidate region can be deleted from the remaining candidate regions. The above operation is repeated until all candidate regions are traversed. Finally, N candidate regions can be selected from the M candidate regions. In this way, only the image features in the above N candidate regions need to be extracted and recognized by the corresponding network structure in the character recognition model, which reduces the overall calculation amount and improves the overall processing efficiency.

[0132] In some embodiments, after screening out N candidate regions, the feature map of the candidate region can also be first pooled using the ROI pooling layer in the character recognition model to ensure consistent feature shape; then the coordinates of the above candidate regions are refined using two characters in the parallel fully connected neural network in the model; then the type of the numerical character in the refined candidate region is predicted, and multiple detection boxes are output; and the confidence of each numerical character is given. The above fine can specifically include correcting the position coordinates of the candidate region (or candidate box) to obtain and output multiple detection boxes (also referred to as character detection boxes). The output multiple detection boxes can also be subjected to NMS (non-maximum suppression) operation to remove detection boxes with high overlap. Finally, the annotation symbols of the type of the numerical character in the multiple detection boxes can be arranged according to the position coordinates (for example, the row coordinates of the detection box) of the detection box to obtain the first character sequence.

[0133] Specifically, for example, referring to Figure 8 illustrated, the output first character sequence 1 can be represented as: 【0003419031】. Referring to Figure 7 illustrated, the output first character sequence 2 can be represented as: 【9-10-4-1-80-1-5-5】. Wherein, “-” is a reverse identifier, used to represent that the annotation symbol is a numerical character recognized in the reversed state.

[0134] In some embodiments, further, considering the complexity of the offline environment, the above-mentioned way may also result in incorrect detection of numerical characters. Therefore, after obtaining multiple detection boxes, the above-mentioned detection can also be filtered based on a preset processing strategy to obtain a numerical character sequence with less error and higher accuracy.

[0135] Specifically, after obtaining multiple detection boxes, based on the preset processing strategy, the length and width parameters of each detection box can be first obtained, and the length and width mean of the detection box can be calculated. The length and width parameters of the multiple detection boxes are iterated again, and the detection boxes whose length and width parameters are less than 80% of the mean are determined as abnormal boxes, and the above-mentioned abnormal boxes are filtered out; then the second identification character sequence is obtained according to the filtered detection boxes. Thus, a first identification character sequence with higher accuracy and less error can be obtained.

[0136] After obtaining the first character sequence, it can be first detected whether the first character sequence contains a reverse identifier. In the case where it is determined that there is no reverse identifier in the first character sequence, it can be determined that there is no character in the reversed state, and therefore the first character sequence can be directly determined as the second character sequence. For example, for the first character sequence 1 【0003419031】, since there is no reverse identifier, it can be determined that the corresponding second character sequence 1 is still 【0003419031】.

[0137] On the contrary, in a case where it is determined that the first character sequence contains the reverse identifier, it can be determined that the character in the reverse state exists, and a preset correction process needs to be performed on the first character sequence to obtain a corresponding second character sequence as the second identification character sequence.

[0138] In some embodiments, the above-mentioned preset correction process on the first character sequence to obtain the corresponding second character sequence can specifically include the following contents: performing mapping processing on the characters in the first character sequence according to a preset reverse character mapping relationship to obtain a processed first character sequence; and performing reverse sequence arrangement on the processed first character sequence to obtain the corresponding second character sequence.

[0139] The preset reverse character mapping relationship can specifically include the corresponding relationship between the annotation symbol carrying the reverse identifier and the character in the non-reverse state. For example, based on the reverse character mapping relationship, the annotation symbol "-5" can be mapped into the numerical character "5" in the non-reverse state, the annotation symbol "9" can be mapped into the numerical character "6" in the non-reverse state, and so on.

[0140] Specifically, for example, for the first character sequence 2【9-10-4-1-80-1-5-5】, according to the preset reverse character mapping relationship, it can be mapped into the corresponding processed first character sequence 2【6104180155】.

[0141] Further, the numerical character arranged at the last position in the first character sequence 2【6104180155】 can be arranged at the first position, the numerical character arranged at the second last position can be arranged at the second position, and so on, and the reverse sequence arrangement is performed to finally obtain the corresponding second character sequence 2【5510814016】.

[0142] In some embodiments, after obtaining the corresponding second character sequence by processing the second sub-picture, the number of numerical characters contained in the second character sequence can be counted; and whether the number is equal to a reference number can be compared. The reference number can be determined according to the number of numerical characters contained in the device identifier of the shared device.

[0143] If the number is not equal to the reference number, it can be judged that the currently recognized second character sequence has an error, and the second character sequence is marked as untrusted. Further, the second sub-picture can be reprocessed to reacquire the second character sequence. On the contrary, if the number is equal to the reference number, it can be judged that the currently recognized second character sequence has a certain credibility and can be used.

[0144] In some embodiments, the determining the device identifier of the target sharing device according to the first sequence of identification characters and the second sequence of identification characters can include the following: comparing the first sequence of identification characters and the second sequence of identification characters; and in a case where the first sequence of identification characters and the second sequence of identification characters are determined to be the same, determining the first sequence of identification characters or the second sequence of identification characters as the device identifier of the target sharing device. Correspondingly, the method can further include the following: maintaining and managing the target sharing device according to the device identifier of the target sharing device.

[0145] Through the above embodiments, the first sequence of identification characters obtained based on the first sub-picture and the second sequence of identification characters obtained based on the second sub-picture can be combined to verify each other. In a case where the first sequence of identification characters and the second sequence of identification characters are determined to be the same, the verification passes, it is determined that the obtained first sequence of identification characters and the second sequence of identification characters are both correct, and then the first sequence of identification characters or the second sequence of identification characters can be determined as the device identifier of the target sharing device.

[0146] On the contrary, in a case where the first sequence of identification characters and the second sequence of identification characters are determined to be different, the verification fails, it can be judged that at least one of the obtained first sequence of identification characters and the second sequence of identification characters is incorrect, and at this time, the first sub-picture and the second sub-picture can be reprocessed to reacquire the first sequence of identification characters and the second sequence of identification characters.

[0147] In some cases, considering that the error probability of obtaining the second sequence of identification characters based on the second sub-picture through image recognition is relatively higher, the processing result based on the first sub-picture can also be accepted, and the first sequence of identification characters can be determined as the required device identifier.

[0148] In some embodiments, the target picture can also carry collection position information. Correspondingly, the maintaining and managing the target sharing device according to the device identifier of the target sharing device can specifically include the following: determining and updating the position coordinates of the target sharing device according to the device identifier and the position information of the target sharing device; and in a case where it is detected that the target sharing device satisfies a preset triggering condition (for example, the position coordinates have not been updated for more than 10 days), sending prompt information to a maintenance personnel to prompt the maintenance personnel to go to the corresponding position to timely detect and maintain the target sharing device according to a preset maintenance and management strategy. Further, the use situation and distribution state of the sharing devices can be determined according to the device identifiers and the position coordinates of the sharing devices, so as to better guide the offline delivery of the sharing devices. In addition, the work situation and work quality of the maintenance personnel can be reasonably evaluated according to the device identifier determined based on the target picture provided by the maintenance personnel.

[0149] The embodiments of the present specification further provide another method for determining a device identifier of a shared device, which can include the following when implemented:

[0150] S1: obtaining a target picture containing a target shared device;

[0151] S2: performing correction processing on a first sub-picture containing an identifier code obtained based on the target picture to obtain a corrected picture;

[0152] S4: performing analysis processing on the identifier code in the corrected picture to obtain an identifier character sequence corresponding to the identifier code;

[0153] In the case of failure of the analysis processing on the identifier code in the corrected picture, the method further includes:

[0154] S5: performing recognition on a second sub-picture containing the identifier character sequence obtained based on the target picture to obtain the identifier character sequence.

[0155] In some embodiments, the first sub-picture can be understood as a local picture containing the identifier code arranged on the target shared device segmented from the target picture. The second sub-picture can be understood as a local picture containing the identifier character sequence of the target shared device segmented from the target picture.

[0156] In some embodiments, the first sub-picture can be segmented from the target picture, and the analysis processing can be performed on the identifier code in the first sub-picture.

[0157] In the case of determining that the corresponding identifier character sequence cannot be parsed from the identifier code in the first sub-picture, the correction processing is triggered on the first sub-picture. The analysis processing is performed on the identifier code in the corrected picture to obtain the identifier character sequence corresponding to the identifier code.

[0158] In the case of failure of the analysis processing on the identifier code in the corrected picture, the second sub-picture can be segmented from the target picture. The recognition is performed on the second sub-picture to recognize the identifier character sequence from the second sub-picture.

[0159] As can be seen, based on the method for determining the device identifier of the shared device provided in the embodiments of the present specification, after obtaining the target picture containing the target shared device, the first sub-picture containing the identifier code and the second sub-picture containing the identifier character sequence can be segmented from the target picture respectively; then the first identifier character sequence and the second identifier character sequence are obtained by processing the first sub-picture and the second sub-picture respectively; and then the device identifier of the target shared device is determined according to the first identifier character sequence and the second identifier character sequence. Thus, the device identifier of the shared device in the picture can be accurately and efficiently identified and determined, the identification error is reduced, and the identification accuracy is improved.

[0160] Referring to Figure 9 The embodiments of the present specification also provide a method for obtaining an identifier character sequence. When the method is implemented, the following contents can be included:

[0161] S901: detecting the edge contour of the first target picture based on an edge detection algorithm to obtain an edge detection result; wherein the first target picture contains at least an identifier code;

[0162] S902: segmenting a local picture containing the identifier code from the first target picture according to the edge detection result;

[0163] S903: performing position transformation on the pixel points in the local picture to obtain a corrected local picture;

[0164] S904: performing analysis processing on the identifier code in the corrected local picture to obtain an identifier character sequence corresponding to the identifier code.

[0165] The first target picture can be a picture containing at least an identifier code. The identifier code implicitly contains an identifier character sequence corresponding to the identifier code.

[0166] In some embodiments, when implemented, the target detection model can be used to process the first target picture to segment a picture containing a smaller image area of the identifier code from the first target picture and replace the first target picture to participate in subsequent data processing, so that the amount of subsequent data processing can be reduced.

[0167] In some embodiments, the above-mentioned segmentation of the local picture containing the identifier code from the first target picture according to the edge detection result can include: determining the key point region of the identifier code in the first target picture according to the edge detection result; and segmenting the local picture containing the identifier code from the first target picture according to the key point region of the identifier code.

[0168] In some embodiments, the position of the pixels in the local picture is transformed to obtain a corrected local picture. In specific implementation, the center coordinates of the corresponding virtual point region can be determined according to the center coordinates of the key point region; the position transformation matrix can be determined according to the center coordinates of the key point region and the center coordinates of the virtual point region; the position of the pixels in the region surrounded by the center of the key point region and the center of the virtual point region in the local picture is transformed by using the position transformation matrix to obtain the corrected local picture.

[0169] In some embodiments, after obtaining the corrected local picture, the method can further include, in specific implementation, a second correction processing of the corrected local picture to obtain a second corrected local picture as a corrected picture; wherein the second correction processing includes at least one of color and light correction, gamma correction, and HDR-based color compensation correction.

[0170] Through the above embodiments, the corresponding identification character sequence can be accurately and efficiently obtained by analyzing the identification code in the first target picture.

[0171] Referring to Figure 10 The embodiments of the present specification also provide a method for obtaining an identification character sequence. In specific implementation, the method can include the following contents:

[0172] S1001: extracting the corresponding image features from the second target picture, and determining a first character sequence according to the image features; wherein the second target picture at least contains an identification character sequence;

[0173] S1002: detecting whether there is a reversed identifier in the first character sequence;

[0174] S1003: in the case where it is determined that there is a reversed identifier in the first character sequence, performing a preset correction processing on the first character sequence to obtain a corresponding second character sequence as an identification character sequence.

[0175] In some embodiments, the second target picture can be a picture containing at least an identification character sequence.

[0176] In some embodiments, in specific implementation, the target detection model can be used to process the second target picture to segment out a picture containing a smaller identification code image region and replace the second target picture to participate in subsequent data processing, so as to reduce the amount of subsequent data processing.

[0177] In some embodiments, in specific implementation, the character recognition model can be used to extract the corresponding image features from the second target picture, and output the first character sequence according to the image features.

[0178] In some embodiments, the above-mentioned preset correction processing of the first character sequence to obtain the corresponding second character sequence can include the following contents: according to the preset reverse character mapping relationship, the characters in the first character sequence are respectively mapped to obtain the processed first character sequence; the processed first character sequence is arranged in reverse order to obtain the corresponding second character sequence; and the second character sequence is determined as the second identification character sequence.

[0179] Through the above-mentioned embodiments, the identification character sequence in the second target picture can be accurately and efficiently recognized by image recognition to obtain the required second identification character sequence.

[0180] The embodiments of the present specification also provide a server, comprising a processor and a memory for storing processor executable instructions, and the processor can perform the following steps according to the instructions when implemented: obtaining a target picture containing a target sharing device; segmenting a first sub-picture and a second sub-picture from the target picture; wherein the first sub-picture contains an identification code arranged on the target sharing device; the second sub-picture contains an identification character sequence of the target sharing device; processing the first sub-picture to obtain a first identification character sequence; processing the second sub-picture to obtain a second identification character sequence; determining the device identification of the target sharing device according to the first identification character sequence and the second identification character sequence.

[0181] In order to be able to more accurately complete the above-mentioned instructions, referring to Figure 11 The embodiments of the present specification also provide another specific server, wherein the server comprises a network communication port 1101, a processor 1102 and a memory 1103, and the above-mentioned structures are connected by internal cables so that each structure can perform specific data interaction.

[0182] The network communication port 1101 can be specifically used to obtain a target picture containing a target sharing device.

[0183] The processor 1102 can be specifically used to segment a first sub-picture and a second sub-picture from the target picture; wherein the first sub-picture contains an identification code arranged on the target sharing device; the second sub-picture contains an identification character sequence of the target sharing device; processing the first sub-picture to obtain a first identification character sequence; processing the second sub-picture to obtain a second identification character sequence; determining the device identification of the target sharing device according to the first identification character sequence and the second identification character sequence.

[0184] The memory 1103 can be specifically used to store the corresponding instruction program.

[0185] In the embodiment, the network communication port 1101 can be a virtual port bound with different communication protocols, so as to send or receive different data. For example, the network communication port can be a port responsible for web data communication, a port responsible for FTP data communication, or a port responsible for mail data communication. In addition, the network communication port can also be an entity communication interface or a communication chip. For example, it can be a wireless mobile network communication chip such as GSM, CDMA, etc.; it can also be a Wifi chip; it can also be a Bluetooth chip.

[0186] In the embodiment, the processor 1102 can be implemented in any appropriate manner. For example, the processor can take the form of, for example, a microprocessor or processor and a computer readable medium storing computer readable program code (e.g., software or firmware) executable by the (micro)processor, logic gates, switches, an application specific integrated circuit (ASIC), a programmable logic controller, and an embedded microcontroller, etc. The present specification is not limited thereto.

[0187] In the embodiment, the memory 1103 can include multiple levels, and in a digital system, as long as it can save binary data, it can be a memory; in an integrated circuit, a circuit without a physical form and with a storage function is also called a memory, such as RAM, FIFO, etc.; in a system, a storage device with a physical form is also called a memory, such as a memory stick, a TF card, etc.

[0188] The embodiment of the present specification also provides a server, including a processor and a memory for storing processor executable instructions, and the processor can implement the following steps according to the instructions when implemented: detecting the edge contour of a first target picture based on an edge detection algorithm to obtain an edge detection result; wherein the first target picture at least contains an identification code; segmenting a local picture containing the identification code from the first target picture according to the edge detection result; performing position transformation on the pixel points in the local picture to obtain a corrected local picture; and performing analysis processing on the identification code in the corrected picture to obtain an identification character sequence corresponding to the identification code.

[0189] The embodiment of the present specification also provides a server, comprising a processor and a memory for storing processor executable instructions, wherein the processor, when implemented, can execute the following steps according to the instructions: extracting corresponding image features from a second target picture, and determining a first character sequence according to the image features; wherein the second target picture at least contains an identification character sequence; detecting whether a reverse identifier exists in the first character sequence; in the case that it is determined that the reverse identifier exists in the first character sequence, performing a preset correction processing on the first character sequence to obtain a corresponding second character sequence as the identification character sequence.

[0190] The embodiment of the present specification also provides a server, comprising a processor and a memory for storing processor executable instructions, wherein the processor, when implemented, can execute the following steps according to the instructions: obtaining a target picture containing a target shared device; performing a correction processing on a first sub-picture containing an identification code obtained based on the target picture to obtain a corrected picture; performing an analysis processing on the identification code in the corrected picture to obtain an identification character sequence corresponding to the identification code; in the case that the analysis processing on the identification code in the corrected picture fails, the method further comprises: performing an identification on a second sub-picture containing the identification character sequence based on the target picture to obtain the identification character sequence.

[0191] The embodiment of the present specification also provides a computer storage medium based on the above-mentioned determination method of the device identification of the shared device, wherein the computer storage medium stores computer program instructions, and when the computer program instructions are executed, the following steps are implemented: obtaining a target picture containing a target shared device; segmenting a first sub-picture and a second sub-picture from the target picture; wherein the first sub-picture contains an identification code arranged on the target shared device; the second sub-picture contains an identification character sequence of the target shared device; processing the first sub-picture to obtain a first identification character sequence; processing the second sub-picture to obtain a second identification character sequence; determining the device identification of the target shared device according to the first identification character sequence and the second identification character sequence.

[0192] The embodiment of the present specification also provides a computer storage medium based on the above-mentioned determination method of the device identification of the shared device, wherein the computer storage medium stores computer program instructions, and when the computer program instructions are executed, the following steps are implemented: obtaining a target picture containing a target shared device; segmenting a first sub-picture and a second sub-picture from the target picture; wherein the first sub-picture contains an identification code arranged on the target shared device; the second sub-picture contains an identification character sequence of the target shared device; processing the first sub-picture to obtain a first identification character sequence; processing the second sub-picture to obtain a second identification character sequence; determining the device identification of the target shared device according to the first identification character sequence and the second identification character sequence.

[0193] The embodiment of the present specification also provides a computer storage medium based on the above-mentioned acquisition method of the identification character sequence, and the computer storage medium stores computer program instructions which, when executed, implement: extracting a corresponding image feature from a second target picture, and determining a first character sequence according to the image feature; wherein the second target picture at least contains an identification character sequence; detecting whether a reverse identifier exists in the first character sequence; in the case where it is determined that the reverse identifier exists in the first character sequence, performing a preset correction processing on the first character sequence to obtain a corresponding second character sequence as the identification character sequence.

[0194] In the embodiment, the storage medium includes but is not limited to a random access memory (RAM), a read-only memory (ROM), a cache, a hard disk drive (HDD) or a memory card. The storage can be used to store computer program instructions. The network communication unit can be an interface set according to the standard of a communication protocol, used for network connection communication.

[0195] In the embodiment, the functions and effects realized by the program instructions stored in the computer storage medium can be explained in comparison with other embodiments, and will not be described here.

[0196] Referring to Figure 12 As shown in the software layer, the embodiment of the present specification also provides a device identification determination apparatus of a shared device, which specifically can include the following structure modules:

[0197] The acquisition module 1201 can be specifically used for acquiring a target picture containing a target shared device;

[0198] The segmentation module 1202 can be specifically used for segmenting a first sub-picture and a second sub-picture from the target picture; wherein the first sub-picture contains an identification code arranged on the target shared device; and the second sub-picture contains an identification character sequence of the target shared device;

[0199] The processing module 1203 can be specifically used for processing the first sub-picture to obtain a first identification character sequence, and processing the second sub-picture to obtain a second identification character sequence;

[0200] The determination module 1204 can be specifically used for determining a device identification of the target shared device according to the first identification character sequence and the second identification character sequence.

[0201] In some embodiments, the determining module 1204, when specifically implemented, can determine the device identifier of the target sharing device according to the first sequence of identification characters and the second sequence of identification characters in the following manner: comparing the first sequence of identification characters and the second sequence of identification characters; in a case where it is determined that the first sequence of identification characters and the second sequence of identification characters are the same, determining the first sequence of identification characters or the second sequence of identification characters as the device identifier of the target sharing device; correspondingly, the apparatus is further configured to maintain and manage the target sharing device according to the device identifier of the target sharing device.

[0202] In some embodiments, the identification code can specifically include a two-dimensional code and the like, and the sequence of identification characters can specifically include a sequence of numerical characters and the like.

[0203] In some embodiments, the segmentation module 1202, when specifically implemented, can segment the first sub-picture and the second sub-picture from the target picture in the following manner: processing the target picture by using a target detection model to obtain first coordinate information of an image region containing the identification code and second coordinate information of an image region containing the sequence of identification characters; segmenting the first sub-picture from the target picture according to the first coordinate information; and segmenting the second sub-picture from the target picture according to the second coordinate information.

[0204] In some embodiments, the processing module 1203, when specifically implemented, can process the first sub-picture to obtain the first sequence of identification characters in the following manner: performing analysis processing on the identification code in the first sub-picture; and in a case where the analysis processing is successful, obtaining the first sequence of identification characters corresponding to the identification code.

[0205] In a case where the analysis processing fails, the processing module 1203 can be further configured to perform correction processing on the first sub-picture to obtain a corrected picture; and perform analysis processing on the identification code in the corrected picture to obtain the first sequence of identification characters corresponding to the identification code.

[0206] In some embodiments, the processing module 1203, when specifically implemented, can perform correction processing on the first sub-picture in the following manner: detecting an edge contour of the first sub-picture based on an edge detection algorithm to obtain an edge detection result; determining a key point region of the identification code in the first sub-picture according to the edge detection result; segmenting a local picture containing the identification code from the first sub-picture according to the key point region of the identification code; and performing position transformation on a pixel point in the local picture to obtain a first corrected local picture.

[0207] In some embodiments, the processing module 1203, when implemented, can perform position transformation on the pixels in the local picture in the following manner to obtain the first corrected local picture: determining the center coordinates of the corresponding virtual point region according to the center coordinates of the key point region; determining a position transformation matrix according to the center coordinates of the key point region and the center coordinates of the virtual point region; and performing position transformation on the pixels in the region surrounded by the center of the key point region and the center of the virtual point region in the local picture by using the position transformation matrix to obtain the first corrected local picture.

[0208] In some embodiments, the processing module 1203, when implemented, can further perform second correction processing on the first corrected local picture to obtain a second corrected local picture as the corrected picture after performing position transformation on the pixels in the region surrounded by the center of the key point region and the center of the virtual point region in the local picture by using the position transformation matrix to obtain the first corrected local picture. The second correction processing includes at least one of the following: color and light correction, gamma correction, and HDR-based color compensation correction.

[0209] In some embodiments, the processing module 1203, when implemented, can process the second sub-picture in the following manner to obtain the second identification character sequence: processing the second sub-picture by using a character recognition model to obtain the second identification character sequence.

[0210] In some embodiments, the processing module 1203, when implemented, can process the second sub-picture by using a character recognition model in the following manner to obtain the second identification character sequence: extracting corresponding image features from the second sub-picture by using the character recognition model, and outputting a first character sequence according to the image features; detecting whether there is a reversal identifier in the first character sequence; and performing a preset correction processing on the first character sequence to obtain a corresponding second character sequence as the second identification character sequence in a case where it is determined that there is a reversal identifier in the first character sequence.

[0211] In some embodiments, the processing module 1203, when implemented, can perform preset correction processing on the first character sequence in the following manner to obtain a corresponding second character sequence: performing mapping processing on the characters in the first character sequence respectively according to a preset reversal character mapping relationship to obtain a processed first character sequence; and performing reverse order arrangement on the processed first character sequence to obtain the corresponding second character sequence.

[0212] In some embodiments, the apparatus further comprises a training module, which can be specifically configured to collect a sample image; label the sample image according to a character type and a reverse state of a character in the sample image to obtain a labeled sample image; and train a model using the labeled sample image to obtain the character recognition model.

[0213] The embodiments of the present specification further provide an acquisition apparatus of an identification character sequence, referring to Figure 13 The apparatus can specifically comprise the following structure:

[0214] The detection module 1301 can be specifically configured to detect an edge contour of a first target picture based on an edge detection algorithm to obtain an edge detection result, wherein the first target picture at least contains an identification code.

[0215] The segmentation module 1302 can be specifically configured to segment a local picture containing the identification code from the first target picture according to the edge detection result.

[0216] The correction module 1303 can be specifically configured to perform position transformation on a pixel point in the local picture to obtain a corrected local picture.

[0217] The analysis module 1304 can be specifically configured to perform analysis processing on the identification code in the corrected picture to obtain an identification character sequence corresponding to the identification code.

[0218] The embodiments of the present specification further provide an acquisition apparatus of an identification character sequence, referring to Figure 14 The apparatus can specifically comprise the following structure:

[0219] The processing module 1401 can be specifically configured to extract a corresponding image feature from a second target picture and determine a first character sequence according to the image feature, wherein the second target picture at least contains an identification character sequence.

[0220] The detection module 1402 can be specifically configured to detect whether a reverse identifier exists in the first character sequence.

[0221] The correction module 1403 can be specifically configured to perform a preset correction processing on the first character sequence to obtain a corresponding second character sequence as the identification character sequence in a case where it is determined that the reverse identifier exists in the first character sequence.

[0222] It should be noted that the units, devices or modules and the like illustrated in the above embodiments can be implemented by computer chips or entities, or by products with certain functions. For the convenience of description, the above devices are described as various modules with functions. Of course, in the implementation of the present specification, the functions of the modules can be implemented in the same or more software and / or hardware, or the modules implementing the same function can be implemented by a combination of sub-modules or sub-units. The above described device embodiments are only illustrative, for example, the division of the units is only a logical function division, and in actual implementation, other division methods can be used, for example, a plurality of units or components can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the coupling or direct coupling or communication connection between the displayed or discussed units can be indirect coupling or communication connection through some interfaces, devices or units, which can be electrical, mechanical or other forms.

[0223] As can be seen from the above, based on the device identifier determination device and the identification character sequence acquisition device of the shared device provided by the embodiments of the present specification, after obtaining the target picture containing the target shared device, the first sub-picture containing the identification code and the second sub-picture containing the identification character sequence can be segmented from the target picture respectively; then by processing the first sub-picture and the second sub-picture respectively, the corresponding first identification character sequence and the second identification character sequence are obtained; and then according to the first identification character sequence and the second identification character sequence, the device identifier of the target shared device is determined. Thus, the device identifier of the shared device in the picture can be accurately and efficiently identified and determined, the identification error is reduced, and the identification accuracy is improved.

[0224] Although the present specification provides method operation steps as described in the embodiments or flowcharts, more or fewer operation steps can be included based on conventional or non-inventive means. The order of steps listed in the embodiments is only one of the many step execution orders, and does not represent the only execution order. In actual device or client product execution, the method order shown in the embodiments or the drawings can be executed in sequence or in parallel (for example, parallel processor or multi-thread processing environment, or even distributed data processing environment). The terms "include", "contain" or any other variant thereof are intended to cover non-exclusive inclusion, so that the process, method, product or device including a series of elements not only includes those elements, but also includes other elements not explicitly listed or inherent to such process, method, product or device. Without more limitations, it does not exclude the presence of other same or equivalent elements in the process, method, product or device including the elements. The terms "first", "second" and the like are used to represent names, and do not represent any particular order.

[0225] Those skilled in the art will also appreciate that, in addition to being implemented in purely computer readable program code means, the controller can be implemented using logic gates, switches, application specific integrated circuits, programmable logic controllers and embedded microcontrollers to perform the same functions as described. The controller can therefore be considered as a hardware component and the means for performing the various functions described can be considered as structures within the hardware component. Alternatively, the means for performing the various functions can be considered as both software modules which implement the method and structures within the hardware component.

[0226] The specification can be described in the general context of computer- executable instructions, such as program modules, being executed by a computer. Generally, program modules include routines, programs, objects, components, data structures, classes, etc., that perform particular tasks or implement particular abstract data types. Computer-executable instructions, associated data structures, and the like, can also be stored in distributed environments, such as over a network, and can be downloaded into local memories of remote processors or devices for execution.

[0227] From the above description of the embodiments, those skilled in the art can clearly understand that the specification can be implemented by means of software plus necessary universal hardware platforms. Based on such an understanding, the technical solutions of the specification can essentially be embodied in a form of software product. The computer software product can be stored in a storage medium, such as ROM / RAM, a magnetic disk, an optical disk, etc., and includes a plurality of instructions to make a computer device (which can be a personal computer, a mobile terminal, a server, or a network device, etc.) execute the methods described in each of the embodiments or some parts of the embodiments.

[0228] The embodiments in the specification are described in a progressive manner, and the same or similar parts among the embodiments can be referred to each other. Each embodiment mainly describes the differences from other embodiments. The specification can be used in many general or specific computer system environments or configurations. For example: personal computers, server computers, handheld or portable devices, tablet devices, multiprocessor systems, microprocessor-based systems, set-top boxes, programmable consumer electronics, network PCs, minicomputers, mainframe computers, distributed computing environments that include any of the above systems or devices, etc.

[0229] Although the specification is described through the embodiments, those skilled in the art know that the specification has many modifications and changes without departing from the spirit of the specification, and it is intended that the appended claims encompass these modifications and changes without departing from the spirit of the specification.

Claims

1. A method for determining the device identifier of a shared device, characterized in that, include: Acquire a target image containing a target shared device; wherein the target shared device includes at least one of the following: a shared cycling device, a shared printer, or a shared battery; the target image also carries acquisition location information; A first sub-image and a second sub-image are segmented from the target image; wherein, the first sub-image contains an identification code deployed on the target sharing device; and the second sub-image contains an identification character sequence of the target sharing device. Process the first sub-image to obtain the first identifier character sequence; process the second sub-image to obtain the second identifier character sequence; Determining the device identifier of the target shared device based on the first identifier character sequence and the second identifier character sequence includes: comparing the first identifier character sequence and the second identifier character sequence; if the first identifier character sequence and the second identifier character sequence are the same, determining the first identifier character sequence or the second identifier character sequence as the device identifier of the target shared device; Based on the device identifier and collected location information of the target shared device, determine and update the location coordinates of the target shared device; according to the preset maintenance management strategy, when the target shared device is detected to meet the preset trigger conditions, send a prompt message to the maintenance personnel to go to the corresponding location to promptly inspect and maintain the target shared device; After obtaining the second identifier character sequence, the method further includes: counting the number of numeric characters contained in the second identifier character sequence; and determining whether the second identifier character sequence is reliable by detecting whether the number is equal to a reference number; the reference number is determined based on the number of numeric characters contained in the device identifier of the target shared device; The process of processing the second sub-image to obtain the second identifier character sequence includes: processing the second sub-image using a character recognition model to obtain the second identifier character sequence; the character recognition model is obtained in the following manner: acquiring sample images; annotating the sample images according to the character type and inversion state of the characters in the sample images to obtain annotated sample images; and training the model using the annotated sample images to obtain the character recognition model.

2. The method according to claim 1, characterized in that, The identification code includes a QR code, and the identification character sequence includes a sequence of numeric characters.

3. The method according to claim 1, characterized in that, Segmenting the first sub-image and the second sub-image from the target image includes: The target image is processed using an object detection model to obtain the first coordinate information of the image region containing the identifier code, and the second coordinate information of the image region containing the identifier character sequence; Based on the first coordinate information, a first sub-image is segmented from the target image; based on the second coordinate information, a second sub-image is segmented from the target image.

4. The method according to claim 2, characterized in that, Processing the first sub-image yields the first identifier character sequence, including: The identifier code in the first sub-image is parsed and processed. If the parsing process is successful, the first identifier character sequence corresponding to the identifier code is obtained; The method further includes: If the parsing process fails, the first sub-image is corrected to obtain the corrected image; The identification code in the corrected image is parsed to obtain the first identification character sequence corresponding to the identification code.

5. The method according to claim 4, characterized in that, The first sub-image undergoes correction processing, including: The edge contours of the first sub-image are detected based on the edge detection algorithm to obtain the edge detection results; Based on the edge detection results, the key point regions of the identifier code in the first sub-image were determined; Based on the key point region of the identifier, segment out the local image containing the identifier from the first sub-image; The positions of the pixels in the local image are transformed to obtain the first corrected local image.

6. The method according to claim 5, characterized in that, The local image is transformed by repositioning the pixels to obtain a first corrected local image, including: Based on the center coordinates of the key point region, determine the center coordinates of the corresponding virtual point region; Determine the position transformation matrix based on the center coordinates of the key point region and the center coordinates of the virtual point region; Using the position transformation matrix, the pixel points within the area bounded by the center of the key point region and the center of the virtual point region in the local image are transformed to obtain the first corrected local image.

7. The method according to claim 6, characterized in that, After using the position transformation matrix to transform the pixel points within the area bounded by the center of the key point region and the center of the virtual point region in the local image to obtain the first corrected local image, the method further includes: The first corrected local image is subjected to a second correction process to obtain a second corrected local image, which is used as the corrected image; wherein, the second correction process includes at least one of the following: color and light correction, gamma correction, and HDR-based color compensation correction.

8. The method according to claim 1, characterized in that, The second sub-image is processed using a character recognition model to obtain the second identifier character sequence, including: The corresponding image features are extracted from the second sub-image using a character recognition model, and the first character sequence is output based on the image features. Detect whether an inverted identifier exists in the first character sequence; If it is determined that there is an inverted identifier in the first character sequence, the first character sequence is subjected to a preset correction process to obtain the corresponding second character sequence, which is used as the second identifier character sequence.

9. The method according to claim 8, characterized in that, The first character sequence is subjected to a preset correction process to obtain the corresponding second character sequence, including: Based on the preset reverse character mapping relationship, the characters in the first character sequence are mapped respectively to obtain the processed first character sequence; The processed first character sequence is reversed to obtain the corresponding second character sequence.

10. A method for obtaining an identifier character sequence, characterized in that, include: Edge detection results are obtained by detecting the edge contour of the first target image based on an edge detection algorithm; wherein, the first target image contains at least an identification code; the identification code is the identification code of the target shared device; the target shared device includes at least one of the following: shared cycling equipment, shared printer, shared battery; the first target image also carries collection location information; Based on the edge detection results, a local image containing the identifier code is segmented from the first target image; The positions of the pixels in the local image are transformed to obtain the corrected local image; The identification code in the corrected image is parsed to obtain the identification character sequence corresponding to the identification code; Furthermore, the method further includes: comparing an identifier character sequence with an identifier character sequence obtained by processing a second target image containing an identifier character sequence of the target shared device; if the two identifier character sequences are identical, determining the identifier character sequence as the device identifier of the target shared device; determining and updating the location coordinates of the target shared device based on the device identifier of the target shared device and the acquisition location information; and, according to a preset maintenance management strategy, sending a prompt message to maintenance personnel when the target shared device is detected to meet preset triggering conditions, prompting maintenance personnel to go to the corresponding location to promptly inspect and maintain the target shared device; wherein the identifier character sequence is obtained by processing the second target image using a character recognition model; the character recognition model is obtained as follows: acquiring sample images; annotating the sample images according to the character type and inversion state of the characters in the sample images to obtain an annotated sample image; and training the model using the annotated sample image to obtain the character recognition model. After obtaining the identifier character sequence based on the processing of the second target image, the method further includes: counting the number of numeric characters contained in the identifier character sequence; and determining whether the identifier character sequence is reliable by detecting whether the number is equal to a reference number; the reference number is determined based on the number of numeric characters contained in the device identifier of the target shared device.

11. A method for obtaining an identifier character sequence, characterized in that, include: The corresponding image features are extracted from the second target image, and the first character sequence is determined based on the image features; wherein, the second target image contains at least an identifier character sequence; the identifier character sequence is the identifier character sequence of the target sharing device; the target sharing device includes at least one of the following: shared cycling equipment, shared printer, shared battery; the second target image also carries the collection location information; Detect whether an inverted identifier exists in the first character sequence; If it is determined that there is an inverted identifier in the first character sequence, the first character sequence is subjected to a preset correction process to obtain the corresponding second character sequence, which is used as the identifier character sequence; Furthermore, the method further includes: comparing an identifier character sequence with an identifier character sequence obtained by processing a first target image containing an identifier code of the target shared device; if the two identifier character sequences are found to be the same, determining the identifier character sequence as the device identifier of the target shared device; determining and updating the location coordinates of the target shared device based on the device identifier of the target shared device and the collected location information; and, according to a preset maintenance management strategy, sending a prompt message to maintenance personnel when the target shared device is detected to meet preset triggering conditions, prompting maintenance personnel to go to the corresponding location to promptly inspect and maintain the target shared device. After obtaining the second character sequence, the method further includes: counting the number of numeric characters contained in the second character sequence; and determining whether the second character sequence is reliable by detecting whether the number is equal to a reference number; the reference number is determined based on the number of numeric characters contained in the device identifier of the target shared device. Wherein, the first character sequence is obtained by processing the second target image using a character recognition model; the character recognition model is obtained in the following manner: acquiring sample images; annotating the sample images according to the character type and inversion state of the characters in the sample images to obtain annotated sample images; and training the model using the annotated sample images to obtain the character recognition model.

12. A server, characterized in that, It includes a processor and a memory for storing processor-executable instructions, wherein the processor, when executing the instructions, implements the steps of the method according to any one of claims 1 to 11.

Citation Information

Patent Citations

  • Invoice identification method, apparatus, computer device and storage medium

    CN108345880A

  • Form identification method, device and apparatus

    CN110309796A

  • Label information identification method and device

    CN110796210A

  • Cigarette code detection and recognition method and device

    CN112434544A

  • Method and device for identifying printed characters on chip resistor, terminal and medium

    CN113283441A