Information identification method, device, electronic device and storage medium
By determining the position and center position of each graphic in the graphic group and the arrangement order, the problem of specifying the starting graphic or adding position detection in the prior art is solved, and the efficiency and consistency of the identification of graphic group information is achieved.
Patent Information
- Application Number
- CN202111030487.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-09-03
- Publication Date
- 2025-04-01
- Estimated Expiration
- 2041-09-03
AI Technical Summary
In the prior art, when using graphic groups to express information, it is necessary to specify the starting graphic group of the graphic group or add additional position detection and positioning graphic, which increases the cost of user use and learning.
By determining the position and center position of each figure in the graphic group in the image to be identified, the arrangement order between the figures in the graphic group is determined based on these positions, and finally the target information corresponding to the graphic group is determined, without specifying the starting figure or adding position detection.
The identification of target information in the graphic group is achieved, the consistency of the information represented by the same graphic is maintained, and the workload of graphic style design and user usage and learning costs are reduced.
Smart Images

Figure CN113706660B_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of information technology, and in particular to an information identification method, device, electronic device and storage medium. Background Art
[0002] Currently, in many application scenarios, different graphics are used to be arranged into graphic groups according to a certain positional relationship, and information is expressed through the graphic groups.
[0003] However, in the prior art, when using a graphic group to express information, it is necessary to specify a starting graphic of the graphic group, or to add additional position detection and positioning graphics, thereby increasing the cost for users to use or learn the graphic group. Summary of the invention
[0004] In order to solve the above technical problems or at least partially solve the above technical problems, the embodiments of the present disclosure provide an information identification method, device, electronic device and storage medium, which realize the identification of target information. For each graphic in the graphic group, there is no need to specify a starting graphic, nor to add additional position detection and positioning graphics, thereby maintaining the consistency of the information represented by the same graphic in the graphic group, reducing the workload of designing graphic styles, and reducing the user's usage and learning costs when customizing the arrangement of graphics.
[0005] In a first aspect, an embodiment of the present disclosure provides an information identification method, including:
[0006] Respectively determine the position of each graphic in the graphic group in the image to be identified and the center position of the graphic group;
[0007] Determine the arrangement order of the graphics in the graphic group based on the position of each graphic and the center position;
[0008] The target information corresponding to the graphic group is determined according to the graphics in the graphic group and the arrangement order.
[0009] In a second aspect, the present disclosure also provides an information identification device, including:
[0010] A first determination module is used to respectively determine the position of each graphic in the graphic group in the image to be identified and the center position of the graphic group;
[0011] Based on the position of each graphic
[0012] A second determining module, configured to determine an arrangement order of graphics in the graphic group according to the position of each graphic and the center position;
[0013] The identification module is used to determine the target information corresponding to the graphic group according to the graphics in the graphic group and the arrangement order.
[0014] In a third aspect, an embodiment of the present disclosure further provides an electronic device, the electronic device comprising:
[0015] one or more processors;
[0016] A storage device for storing one or more programs;
[0017] When the one or more programs are executed by the one or more processors, the one or more processors implement the information identification method as described above.
[0018] In a fourth aspect, an embodiment of the present disclosure further provides a computer-readable storage medium having a computer program stored thereon, which implements the information identification method as described above when executed by a processor.
[0019] Compared with the prior art, the technical solution provided by the embodiments of the present disclosure has at least the following advantages:
[0020] The information recognition method provided by the embodiment of the present disclosure first determines the position of each graphic in the graphic group and the center position of the graphic group, and then determines the arrangement order between the graphics in the graphic group according to the position of each graphic and the center position, and finally determines the target information corresponding to the graphic group according to the graphics in the graphic group and the arrangement order. Through the above information recognition method, there is no need to specify a starting graphic, nor to add additional position detection and positioning graphics, which maintains the consistency of the information represented by the same graphic in the graphic group, reduces the design workload of the graphic style, and reduces the user's use and learning costs when customizing the arrangement of graphics. BRIEF DESCRIPTION OF THE DRAWINGS
[0021] The above and other features, advantages and aspects of the embodiments of the present disclosure will become more apparent with reference to the following detailed description in conjunction with the accompanying drawings. Throughout the accompanying drawings, the same or similar reference numerals represent the same or similar elements. It should be understood that the drawings are schematic and the originals and elements are not necessarily drawn to scale.
[0022] Figure 1 is a flow chart of an information identification method in an embodiment of the present disclosure;
[0023] Figure 2 is a schematic diagram of a graphic group in an embodiment of the present disclosure;
[0024] Figure 3 is a schematic diagram of a graphic group in an embodiment of the present disclosure;
[0025] Figure 4is a flow chart of an information identification method in an embodiment of the present disclosure;
[0026] Figure 5 is a flow chart of an information identification method in an embodiment of the present disclosure;
[0027] Figure 6 is a flow chart of an information identification method in an embodiment of the present disclosure;
[0028] Figure 7 A schematic diagram of a graphics arrangement clockwise or counterclockwise in an embodiment of the present disclosure;
[0029] Figure 8 is a structural schematic diagram of an information identification device in an embodiment of the present disclosure;
[0030] Fig. 9 It is a structural schematic diagram of an electronic device in an embodiment of the present disclosure. DETAILED DESCRIPTION
[0031] Embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although certain embodiments of the present disclosure are shown in the accompanying drawings, it should be understood that the present disclosure can be implemented in various forms and should not be construed as being limited to the embodiments described herein, which are instead provided for a more thorough and complete understanding of the present disclosure. It should be understood that the drawings and embodiments of the present disclosure are only for exemplary purposes and are not intended to limit the scope of protection of the present disclosure.
[0032] It should be understood that the various steps described in the method embodiments of the present disclosure can be performed in different orders and in parallel. In addition, the method embodiments may include additional steps and / or omit the steps shown. The scope of the present disclosure is not limited in this respect.
[0033] The term "including" and its variations used herein are open inclusions, i.e., "including but not limited to". The term "based on" means "based at least in part on". The term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one additional embodiment"; the term "some embodiments" means "at least some embodiments". The relevant definitions of other terms will be given in the following description.
[0034] It should be noted that the concepts such as "first" and "second" mentioned in the present disclosure are only used to distinguish different devices, modules or units, and are not used to limit the order or interdependence of the functions performed by these devices, modules or units.
[0035] It should be noted that the modifications of "one" and "plurality" mentioned in the present disclosure are illustrative rather than restrictive, and those skilled in the art should understand that unless otherwise clearly indicated in the context, it should be understood as "one or more".
[0036] The names of the messages or information exchanged between multiple devices in the embodiments of the present disclosure are only used for illustrative purposes and are not used to limit the scope of these messages or information.
[0037] Figure 1 This is a flowchart of an information identification method in an embodiment of the present disclosure, and this embodiment can be applied to a terminal or a server. The method can be executed by an information identification device, which can be implemented in software and / or hardware, and can be configured in an electronic device, such as a terminal, specifically including but not limited to a smart phone, a PDA, a tablet computer, a wearable device with a display screen, a desktop computer, a laptop computer, an all-in-one machine, a smart home device (such as a desk lamp), etc.
[0038] like Figure 1 As shown, the method may specifically include the following steps:
[0039] Step 110: determine the position of each graphic in the graphic group in the image to be recognized and the center position of the graphic group.
[0040] The graphic group is composed of at least two graphics arranged according to a certain rule. The position of each graphic can specifically refer to the position of the centroid of the graphic. For regular graphics, such as squares, rectangles, etc., the position of the graphic can also refer to a certain agreed position, such as the position of the upper left corner of the graphic. For example, refer to Figure 2 A schematic diagram of a graphic group is shown, the graphic group includes a square, a circle and a rectangle, wherein the centroid position of the square is 210, the centroid position of the circle is 220, the centroid position of the rectangle is 230, and the center position of the graphic group is 240.
[0041] Compare with reference Figure 3 A schematic diagram of a graphic group shown in FIG. 1 , the graphic group includes a circle, a square and a rectangle. Figure 3 The order of arrangement between the graphics in Figure 2 The order of the graphics in the figure is different, so Figure 2 and Figure 3 The graphic groups shown are two different graphic groups that can express different target information.
[0042] In one embodiment, the step of respectively determining the position of each graphic in the graphic group in the image to be identified includes: respectively determining the centroid coordinates of each graphic in the graphic group by a graphic recognition algorithm; determining the centroid coordinates of each graphic as the position of each graphic, for example Figure 2 As shown, the centroid coordinates 210 of the square are determined as the position of the square, the centroid coordinates 220 of the circle are determined as the position of the circle, and the centroid coordinates 230 of the rectangle are determined as the position of the rectangle.
[0043] The center position of the graphic group refers to the center position of the area occupied by the graphic group. In one embodiment, the center position of the graphic group can be determined based on the position of each graphic. In another embodiment, the area occupied by the graphic group can be determined first, and then the center position of the area is determined, and the center position of the area is the center position of the graphic group.
[0044] Step 120: Determine the arrangement order of the graphics in the graphic group according to the position of each graphic and the center position.
[0045] Specifically, in one implementation, the relative position relationship between the graphics may be determined according to the position of each graphic, and then the arrangement order between the graphics in the graphic group may be determined according to the relative position relationship between the graphics.
[0046] In another embodiment, the arrangement order of the graphics in the graphic group can be determined according to the position of each graphic and the center position. Specifically, the relative position relationship between the graphics in the graphic group is determined according to the relative position relationship between the centroid position of each graphic and the center position, thereby determining the arrangement order of the graphics in the graphic group.
[0047] Step 130: Determine target information corresponding to the graphic group according to the graphics in the graphic group and the arrangement order.
[0048] Among them, different arrangement orders can represent different target information. Figure 2 and Figure 3 As shown, although the graphic groups are composed of squares, circles and rectangles, Figure 2 The squares are arranged on the left side of the circle, and Figure 3 The circles are arranged on the left side of the square, so the arrangement order of the figures is different. Figure 2 The graphic group shown is similar to Figure 3 The graphic groups shown are different graphic groups and can represent different target information.
[0049] The information recognition method provided by the embodiment of the present disclosure first determines the position of each graphic in the graphic group and the center position of the graphic group, and then determines the arrangement order between the graphics in the graphic group according to the position of each graphic and the center position, and finally determines the target information corresponding to the graphic group according to the graphics in the graphic group and the arrangement order. Through the above information recognition method, there is no need to specify the starting graphic, and the graphic (such as a triangle) that is usually designated as the starting graphic is no longer used to represent information. Therefore, the information recognition method provided by this embodiment can reduce the occupation of graphic styles, thereby reducing the workload of designing graphic styles. If the graphic designated as the starting graphic is also used to represent information, the consistency of the information represented by the same style graphic cannot be maintained. For example, if the same triangle is a triangle, one triangle is designated as the starting graphic, and the other triangle represents the target information "1", the consistency of the information represented by the same style graphic is destroyed, which increases the difficulty and cost of user use and learning. Through the above information recognition method, there is no need to add additional position detection and positioning graphics, which further reduces the occupation of graphic styles, thereby reducing the amount of graphic style design, maintaining the consistency of information represented by the same style graphics in the graphic group, and reducing the user's use and learning costs when customizing the arrangement of graphics.
[0050] Based on the above embodiments, Figure 4 The flowchart of the information identification method in one embodiment is shown. In this embodiment, an optional implementation is given for the "determining the center position of the graphic group based on the position of each graphic" in the above step. Specifically, the maximum value and minimum value of the horizontal coordinate in the centroid coordinates are determined respectively, wherein the position of each graphic includes the centroid coordinates; the maximum value and minimum value of the vertical coordinate in the centroid coordinates are determined respectively; and the center position is determined based on the maximum value and minimum value of the horizontal coordinate and the maximum value and minimum value of the vertical coordinate. Accurate calculation of the center position is achieved.
[0051] like Figure 4 As shown, the information identification method includes the following steps:
[0052] Step 410: determine the position of each graphic in the graphic group in the image to be recognized.
[0053] Step 420: respectively determine the maximum value and minimum value of the horizontal coordinate in the centroid coordinates, wherein the position of each graphic includes the centroid coordinates; respectively determine the maximum value and minimum value of the vertical coordinate in the centroid coordinates; and determine the center position of the graphic group based on the maximum value and minimum value of the horizontal coordinate and the maximum value and minimum value of the vertical coordinate.
[0054] Wherein, determining the center position of the graphic group based on the maximum and minimum values of the horizontal coordinate and the maximum and minimum values of the vertical coordinate includes: determining the average value of the maximum and minimum values of the horizontal coordinate as the horizontal coordinate of the center position; determining the average value of the maximum and minimum values of the vertical coordinate as the vertical coordinate of the center position.
[0055] Specifically, assuming that the centroid coordinates of each figure are (X1, Y1), (X2, Y2) ... (Xn, Yn), the maximum value of the abscissa in the centroid coordinates (i.e., the maximum value among X1, X2 ... Xn) is determined as Xmax, and the minimum value of the abscissa in the centroid coordinates (i.e., the minimum value among X1, X2 ... Xn) is determined as Xmin, then the abscissa of the center position is Similarly, the maximum value of the ordinate in the centroid coordinates (i.e., the maximum value among Y1, Y2, ..., Yn) is determined as Ymax, and the minimum value of the abscissa in the centroid coordinates (i.e., the minimum value among Y1, Y2, ..., Yn) is determined as Ymin, then the ordinate of the center position is
[0056] Step 430: Determine the arrangement order of the graphics in the graphic group according to the position of each graphic and the center position.
[0057] Step 440: Determine target information corresponding to the graphic group according to the graphics in the graphic group and the arrangement order.
[0058] The technical solution of this embodiment, based on the above embodiment, provides an optional implementation method for "determining the center position of the graphic group based on the position of each graphic" in the above step. Specifically, the maximum value and minimum value of the horizontal coordinate in the centroid coordinates are determined respectively, wherein the position of each graphic includes the centroid coordinates; the maximum value and minimum value of the vertical coordinate in the centroid coordinates are determined respectively; and the center position is determined based on the maximum value and minimum value of the horizontal coordinate and the maximum value and minimum value of the vertical coordinate. Accurate calculation of the center position is achieved.
[0059] Based on the above embodiments, Figure 5 The flowchart of the information identification method in one embodiment is shown. In this embodiment, an optional implementation is given for the above step of "determining the arrangement order of the graphics in the graphic group according to the position of each graphic and the center position". Specifically, any one of the graphics in the graphic group is determined as a reference graphic; and the arrangement order of the graphics in the graphic group is determined according to the relative position between the other graphics in the graphic group except the reference graphic and the reference graphic. The determination of the arrangement order of the graphics in the graphic group is achieved.
[0060] like Figure 5 As shown, the information identification method includes the following steps:
[0061] Step 510: determine the position of each graphic in the graphic group in the image to be recognized.
[0062] Step 520: respectively determine the maximum value and minimum value of the horizontal coordinate in the centroid coordinates, wherein the position of each graphic includes the centroid coordinates; respectively determine the maximum value and minimum value of the vertical coordinate in the centroid coordinates; and determine the center position of the graphic group based on the maximum value and minimum value of the horizontal coordinate and the maximum value and minimum value of the vertical coordinate.
[0063] Step 530: Determine any one of the graphics in the graphics group as a reference graphic, and determine the arrangement order between the graphics in the graphics group according to the relative position of the reference graphic and the center position, and the relative position of the positions of other graphics in the graphics group except the reference graphic and the center position.
[0064] Specifically, in one embodiment, with the center position as the starting point, the line between the center position and the centroid of the reference figure is determined as a reference vector; with the center position as the starting point, the lines between the center position and the centroids of the other figures are respectively determined as numbered vectors, and the angles between the numbered vectors and the reference vectors are respectively determined; the numbered vectors are sorted based on the size of the angles; and the arrangement order between the figures in the figure group is determined according to the sorting between the numbered vectors. For example, with the center position as the starting point, the line between the center position and the centroid of the first figure in the figure group is determined as the first numbered vector, the line between the center position and the centroid of the second figure in the figure group is determined as the second numbered vector, the line between the center position and the centroid of the third figure in the figure group is determined as the third numbered vector, and so on. If the angle between the first numbered vector and the reference vector is 20°, the angle between the second numbered vector and the reference vector is 10°, and the angle between the third numbered vector and the reference vector is 50°, then the result of arranging the numbered vectors in ascending order based on the size of the angles is: the second numbered vector, the first numbered vector, and the third numbered vector. In this way, it can be determined that the arrangement order between the graphics in the graphic group is the second graphic, the first graphic, and the third graphic.
[0065] By taking the center position as the starting point, determining the connecting lines between the center position and the centroids of the other graphics as numbered vectors, respectively, and determining the angles between the numbered vectors and the reference vectors, respectively, and sorting the numbered vectors based on the size of the angles; determining the arrangement order between the graphics in the graphic group according to the sorting between the numbered vectors, thereby forming a clockwise or counterclockwise sorting of the graphic arrangement.
[0066] Specifically, refer to Figure 6 A schematic diagram of the angle between a numbered vector and the reference vector is shown, wherein the reference vector is V0, the numbered vector is V1, the centroid coordinates of the figure corresponding to the numbered vector V1 are (x1, y1), the centroid coordinates of the figure corresponding to the numbered vector V0 are (x0, y0), and the coordinates of the center position are (Cx, Cy). The angles between the numbered vectors and the reference vectors can be calculated by the following formula:
[0067] θ=arctan((y1-Cy) / (x1-Cx))-arctan((y0-Cy) / (x0-Cx))
[0068] For further reference, see Figure 7 The schematic diagram of a clockwise or counterclockwise arrangement of graphics is shown, with the center position 710 of the graphic group as the starting point to establish a connection line with the centroid position of each graphic to form a numbered vector. If the numbered vector is sorted from small to large according to the angle between the numbered vector and the reference vector 720, a clockwise sorting is formed, and if the numbered vector is sorted from large to small according to the angle between the numbered vector and the reference vector 720, a counterclockwise sorting is formed. By using the center position of the graphic group as the starting point of the vector, the entire graphic group is arranged in a ring, so there is no need to pay attention to the position of the entire graphic group (no matter how a ring is arranged, the order between the graphics in the ring will not change), so there is no need to set position detection and positioning graphics, which reduces the occupation of graphic types, thereby reducing the design amount of graphic types, maintaining the consistency of information represented by the same graphic in the graphic group, and reducing the user's use and learning costs when customizing the arrangement of graphics.
[0069] After determining the arrangement order between the graphics in the graphic group, the arrangement order between the graphics is recorded through a certain data structure, which can be considered as a circular linked list in the data structure. All the same circular linked lists will be considered to have the same code and correspond to the same target information. According to the characteristic that the circular linked list does not need to identify the starting node, the recognition algorithm for the arrangement order of graphics provided by the embodiment of the present disclosure does not need to identify the starting point, or any graphic can be used as the starting point.
[0070] Step 540: Determine target information corresponding to the graphic group according to the graphics in the graphic group and the arrangement order.
[0071] Furthermore, in one embodiment, the information recognition method further includes: displaying the target information. Specifically, the graphic group can be printed on a paper in a specific application scenario, and when an electronic device with information recognition function scans the graphic group, the target information corresponding to the graphic group can be determined by identifying the arrangement order between the graphics in the graphic group, and then displayed through a display device for easy viewing by users, thereby achieving the purpose of representing the target information through the graphic group.
[0072] In this embodiment, an optional embodiment is provided for the above step of "determining the arrangement order of the graphics in the graphic group according to the position of each graphic and the center position". Specifically, any one of the graphics in the graphic group is determined as a reference graphic; and the arrangement order of the graphics in the graphic group is determined according to the relative position between the other graphics in the graphic group except the reference graphic and the reference graphic. The determination of the arrangement order of the graphics in the graphic group is achieved.
[0073] Figure 8 Schematic diagram of the structure of an information identification device in an embodiment of the present disclosure. The information identification device provided in the embodiment of the present disclosure can be configured in a client. Figure 8 As shown, the information identification device specifically includes: a first determination module 810, a second determination module 820 and an identification module 830.
[0074] Among them, the first determination module 810 is used to respectively determine the position of each graphic in the graphic group in the image to be identified and the center position of the graphic group; the second determination module 820 is used to determine the arrangement order between the graphics in the graphic group according to the position of each graphic and the center position; the identification module 830 is used to determine the target information corresponding to the graphic group according to the graphics in the graphic group and the arrangement order.
[0075] Optionally, the first determination module 810 includes: a centroid coordinate determination unit, used to determine the centroid coordinates of each graphic in the graphic group in the image to be identified by a graphic recognition algorithm; and a position determination unit, used to determine the centroid coordinates of each graphic as the position of each graphic.
[0076] Optionally, the first determination module 810 further includes: a center position determination unit, configured to determine the center position of the graphic group based on the position of each graphic.
[0077] Optionally, the center position determining unit includes:
[0078] The first determination subunit is used to respectively determine the maximum value and minimum value of the horizontal coordinate in the centroid coordinates, wherein the position of each figure includes the centroid coordinates; the second determination subunit is used to respectively determine the maximum value and minimum value of the vertical coordinate in the centroid coordinates; and the third determination subunit is used to determine the center position based on the maximum value and minimum value of the horizontal coordinate and the maximum value and minimum value of the vertical coordinate.
[0079] Optionally, the third determination subunit is specifically used to: determine the average value of the maximum value and the minimum value of the horizontal coordinate as the horizontal coordinate of the center position; determine the average value of the maximum value and the minimum value of the vertical coordinate as the vertical coordinate of the center position.
[0080] Optionally, the second determination module 820 includes: a first determination unit, used to determine any one graphic in the graphic group as a reference graphic; a second determination unit, used to determine the arrangement order between the graphics in the graphic group based on the relative position of the reference graphic and the center position, and the relative position of the positions of other graphics in the graphic group except the reference graphic and the center position.
[0081] Optionally, the second determining unit includes:
[0082] The first determining subunit is used to determine the line between the center position and the centroid of the reference figure as a reference vector, wherein the position of the figure includes the coordinates of the centroid of the figure; the second determining subunit is used to determine the line between the center position and the centroid of the other figures as numbered vectors, respectively, and respectively determine the angles between the numbered vectors and the reference vectors; the sorting subunit is used to sort the numbered vectors based on the size of the angle; the third determining subunit is used to determine the arrangement order between the figures in the figure group according to the sorting between the numbered vectors.
[0083] Optionally, the information identification device further includes: a display module, configured to display the target information.
[0084] The information recognition device provided by the embodiment of the present disclosure first determines the position of each graphic in the graphic group and the center position of the graphic group, and then determines the arrangement order between the graphics in the graphic group according to the position of each graphic and the center position, and finally determines the target information corresponding to the graphic group according to the graphics in the graphic group and the arrangement order. Through the above information recognition method, the recognition of the target information is realized without specifying the starting graphic or adding additional position detection and positioning graphics, maintaining the consistency of the information represented by the same graphic in the graphic group, reducing the design workload of the graphic style, and reducing the user's use and learning costs when customizing the arrangement of graphics.
[0085] The information identification device provided in the embodiment of the present disclosure can execute the steps in the information identification method provided in the method embodiment of the present disclosure, and the execution steps and beneficial effects are no longer repeated here.
[0086] Fig. 9 Schematic diagram of the structure of an electronic device in the embodiment of the present disclosure. Fig. 9 , which shows a schematic diagram of the structure of an electronic device 500 suitable for implementing the embodiment of the present disclosure. The electronic device 500 in the embodiment of the present disclosure may include, but is not limited to, mobile terminals such as mobile phones, laptop computers, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablet computers), PMPs (portable multimedia players), vehicle terminals (such as vehicle navigation terminals), wearable electronic devices, etc., and fixed terminals such as digital TVs, desktop computers, smart home devices, etc. Fig. 9 The electronic device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present disclosure.
[0087] like Fig. 9 As shown, the electronic device 500 may include a processing device (e.g., a central processing unit, a graphics processing unit, etc.) 501, which can perform various appropriate actions and processes to implement the method of the embodiment described in the present disclosure according to the program stored in the read-only memory (ROM) 502 or the program loaded from the storage device 508 to the random access memory (RAM) 503. In the RAM 503, various programs and data required for the operation of the electronic device 500 are also stored. The processing device 501, the ROM 502, and the RAM 503 are connected to each other via a bus 504. An input / output (I / O) interface 505 is also connected to the bus 504.
[0088] Typically, the following devices may be connected to the I / O interface 505: an input device 506 including, for example, a touch screen, a touch pad, a keyboard, a mouse, a camera, a microphone, an accelerometer, a gyroscope, etc.; an output device 507 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; a storage device 508 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 509. The communication device 509 may allow the electronic device 500 to communicate with other devices wirelessly or by wire to exchange data. Although Fig. 9 The electronic device 500 is shown with various devices, but it should be understood that it is not required to implement or possess all the devices shown. More or fewer devices may be implemented or possessed instead.
[0089] In particular, according to an embodiment of the present disclosure, the process described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present disclosure includes a computer program product, which includes a computer program carried on a non-transitory computer-readable medium, and the computer program includes a program code for executing the method shown in the flowchart, thereby implementing the method as described above. In such an embodiment, the computer program can be downloaded and installed from a network through a communication device 509, or installed from a storage device 508, or installed from a ROM 502. When the computer program is executed by the processing device 501, the above-mentioned functions defined in the method of the embodiment of the present disclosure are executed.
[0090] It should be noted that the computer-readable medium disclosed above may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present disclosure, a computer-readable storage medium may be any tangible medium containing or storing a program that may be used by or in combination with an instruction execution system, device or device. In the present disclosure, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, in which a computer-readable program code is carried. This propagated data signal may take a variety of forms, including but not limited to an electromagnetic signal, an optical signal, or any suitable combination of the above. The computer readable signal medium may also be any computer readable medium other than a computer readable storage medium, which may send, propagate or transmit a program for use by or in conjunction with an instruction execution system, apparatus or device. The program code contained on the computer readable medium may be transmitted using any suitable medium, including but not limited to: wires, optical cables, RF (radio frequency), etc., or any suitable combination of the above.
[0091] In some embodiments, the client and the server may communicate using any currently known or future developed network protocol such as HTTP (HyperText Transfer Protocol), and may be interconnected with any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include a local area network ("LAN"), a wide area network ("WAN"), an internet (e.g., the Internet), and a peer-to-peer network (e.g., an ad hoc peer-to-peer network), as well as any currently known or future developed network.
[0092] The computer-readable medium may be included in the electronic device, or may exist independently without being installed in the electronic device.
[0093] The computer-readable medium carries one or more programs. When the one or more programs are executed by the electronic device, the electronic device:
[0094] The position of each graphic in a graphic group in an image to be identified and the center position of the graphic group are respectively determined, wherein the graphic group includes at least two graphics; the arrangement order between the graphics in the graphic group is determined according to the position of each graphic and the center position; and the target information corresponding to the graphic group is determined according to the graphics in the graphic group and the arrangement order.
[0095] Optionally, when the above one or more programs are executed by the electronic device, the electronic device may also execute other steps described in the above embodiments.
[0096] Computer program code for performing the operations of the present disclosure may be written in one or more programming languages or a combination thereof, including, but not limited to, object-oriented programming languages, such as Java, Smalltalk, C++, and conventional procedural programming languages, such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., through the Internet using an Internet service provider).
[0097] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present disclosure. In this regard, each square box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some implementations as replacements, the functions marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two square boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0098] The units involved in the embodiments described in the present disclosure may be implemented by software or hardware, wherein the name of a unit does not, in some cases, limit the unit itself.
[0099] The functions described above herein may be performed at least in part by one or more hardware logic components. For example, without limitation, exemplary types of hardware logic components that may be used include: field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), complex programmable logic devices (CPLDs), and the like.
[0100] In the context of the present disclosure, a machine-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, device, or equipment. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or equipment, or any suitable combination of the foregoing. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0101] According to one or more embodiments of the present disclosure, the present disclosure provides an information recognition method, comprising: respectively determining the position of each graphic in a graphic group in an image to be recognized and the center position of the graphic group, wherein the graphic group includes at least two graphics; determining an arrangement order between the graphics in the graphic group according to the position of each graphic and the center position; and determining target information corresponding to the graphic group according to the graphics in the graphic group and the arrangement order.
[0102] According to one or more embodiments of the present disclosure, in the information recognition method provided by the present disclosure, optionally, respectively determining the position of each graphic in the graphic group in the image to be recognized includes: respectively determining the centroid coordinates of each graphic in the graphic group through a graphic recognition algorithm; and determining the centroid coordinates of each graphic as the position of each graphic.
[0103] According to one or more embodiments of the present disclosure, in the information recognition method provided by the present disclosure, optionally, determining the center position of the graphic group includes: determining the center position of the graphic group based on the position of each graphic.
[0104] According to one or more embodiments of the present disclosure, in the information recognition method provided by the present disclosure, optionally, determining the center position of the graphic group based on the position of each graphic includes: respectively determining the maximum value and minimum value of the horizontal coordinate in the centroid coordinates, wherein the position of each graphic includes the centroid coordinates; respectively determining the maximum value and minimum value of the vertical coordinate in the centroid coordinates; and determining the center position based on the maximum value and minimum value of the horizontal coordinate and the maximum value and minimum value of the vertical coordinate.
[0105] According to one or more embodiments of the present disclosure, in the information identification method provided by the present disclosure, optionally, determining the center position based on the maximum and minimum values of the horizontal coordinate and the maximum and minimum values of the vertical coordinate includes: determining the average value of the maximum and minimum values of the horizontal coordinate as the horizontal coordinate of the center position; determining the average value of the maximum and minimum values of the vertical coordinate as the vertical coordinate of the center position.
[0106] According to one or more embodiments of the present disclosure, in the information identification method provided by the present disclosure, optionally, determining the arrangement order between the graphics in the graphic group according to the position of each graphic and the center position includes: determining any one graphic in the graphic group as a reference graphic; determining the arrangement order between the graphics in the graphic group according to the relative position of the reference graphic and the center position, and the relative position of the positions of other graphics in the graphic group except the reference graphic and the center position.
[0107] According to one or more embodiments of the present disclosure, in the information identification method provided by the present disclosure, optionally, the method of determining the arrangement order between the graphics in the graphic group according to the relative position of the reference graphic and the center position, and the relative position of the positions of other graphics in the graphic group except the reference graphic and the center position, includes: taking the center position as the starting point, determining the line between the center position and the centroid of the reference graphic as a reference vector, wherein the position of the graphic includes the coordinates of the centroid of the graphic; taking the center position as the starting point, determining the lines between the center position and the centroid of the other graphics as numbered vectors, and determining the angles between the numbered vectors and the reference vectors; sorting the numbered vectors based on the size of the angle; and determining the arrangement order between the graphics in the graphic group according to the sorting between the numbered vectors.
[0108] According to one or more embodiments of the present disclosure, in the information identification method provided by the present disclosure, optionally, it also includes: displaying the target information.
[0109] According to one or more embodiments of the present disclosure, the present disclosure provides an information identification device, including: a first determination module, used to respectively determine the position of each graphic in a graphic group in an image to be identified and the center position of the graphic group; a second determination module, used to determine the arrangement order between the graphics in the graphic group according to the position of each graphic and the center position; an identification module, used to determine the target information corresponding to the graphic group according to the graphics in the graphic group and the arrangement order.
[0110] According to one or more embodiments of the present disclosure, in the information identification device provided by the present disclosure, optionally, the first determination module includes: a centroid coordinate determination unit, used to determine the centroid coordinates of each graphic in the graphic group respectively through a graphic recognition algorithm; and a position determination unit, used to determine the position of the graphic according to the centroid coordinates.
[0111] According to one or more embodiments of the present disclosure, in the information identification device provided by the present disclosure, optionally, the first determination module also includes: a center position determination unit, configured to determine the center position of the graphic group based on the position of each graphic.
[0112] According to one or more embodiments of the present disclosure, in the information identification device provided by the present disclosure, optionally, the center position determination unit includes: a first determination subunit, used to respectively determine the maximum value and minimum value of the horizontal coordinate in the centroid coordinates, wherein the position of each graphic includes the centroid coordinates; a second determination subunit, used to respectively determine the maximum value and minimum value of the vertical coordinate in the centroid coordinates; and a third determination subunit, used to determine the center position based on the maximum value and minimum value of the horizontal coordinate and the maximum value and minimum value of the vertical coordinate.
[0113] According to one or more embodiments of the present disclosure, in the information identification device provided by the present disclosure, optionally, the third determination subunit is specifically used to: determine the average value of the maximum value and the minimum value of the horizontal coordinate as the horizontal coordinate of the center position; determine the average value of the maximum value and the minimum value of the vertical coordinate as the vertical coordinate of the center position.
[0114] According to one or more embodiments of the present disclosure, in the information identification device provided by the present disclosure, optionally, the second determination module includes: a first determination unit, used to determine any one graphic in the graphic group as a reference graphic; a second determination unit, used to determine the arrangement order between the graphics in the graphic group according to the relative position of the reference graphic and the center position, and the relative position of the positions of other graphics in the graphic group except the reference graphic and the center position.
[0115] According to one or more embodiments of the present disclosure, in the information identification device provided by the present disclosure, optionally, the second determination unit includes: a first determination subunit, used to determine the line between the center position and the centroid of the reference figure as a reference vector with the center position as the starting point, wherein the position of the figure includes the coordinates of the centroid of the figure; a second determination subunit, used to determine the line between the center position and the centroid of the other figures as numbered vectors with the center position as the starting point, and respectively determine the angle between the numbered vector and the reference vector; a sorting subunit, used to sort the numbered vectors based on the size of the angle; and a third determination subunit, used to determine the arrangement order between the figures in the figure group according to the sorting between the numbered vectors.
[0116] According to one or more embodiments of the present disclosure, in the information identification device provided by the present disclosure, optionally, the information identification device further includes: a display module, which is used to display the target information.
[0117] According to one or more embodiments of the present disclosure, the present disclosure provides an electronic device, including:
[0118] one or more processors;
[0119] A memory for storing one or more programs;
[0120] When the one or more programs are executed by the one or more processors, the one or more processors implement any information identification method provided in the present disclosure.
[0121] According to one or more embodiments of the present disclosure, the present disclosure provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements any information identification method provided by the present disclosure.
[0122] The embodiments of the present disclosure also provide a computer program product, which includes a computer program or instructions. When the computer program or instructions are executed by a processor, the information identification method described above is implemented.
[0123] The above description is only a preferred embodiment of the present disclosure and an explanation of the technical principles used. Those skilled in the art should understand that the scope of disclosure involved in the present disclosure is not limited to the technical solutions formed by a specific combination of the above technical features, but should also cover other technical solutions formed by any combination of the above technical features or their equivalent features without departing from the above disclosed concept. For example, the above features are replaced with the technical features with similar functions disclosed in the present disclosure (but not limited to) by each other to form a technical solution.
[0124] In addition, although each operation is described in a specific order, this should not be understood as requiring these operations to be performed in the specific order shown or in a sequential order. Under certain circumstances, multitasking and parallel processing may be advantageous. Similarly, although some specific implementation details are included in the above discussion, these should not be interpreted as limiting the scope of the present disclosure. Some features described in the context of a separate embodiment can also be implemented in a single embodiment in combination. On the contrary, the various features described in the context of a single embodiment can also be implemented in multiple embodiments individually or in any suitable sub-combination mode.
[0125] Although the subject matter has been described in language specific to structural features and / or methodological logical actions, it should be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or actions described above. On the contrary, the specific features and actions described above are merely example forms of implementing the claims.
Claims
1. An information identification method, characterized in that: The method comprises: Respectively determine the position of each graphic in a graphic group in the image to be recognized and the center position of the graphic group, wherein the graphic group includes at least two graphics; Determine the arrangement order of the graphics in the graphics group according to the position of each graphic and the center position; wherein, the determination of the arrangement order of the graphics in the graphics group according to the position of each graphic and the center position comprises: determining any one of the graphics in the graphics group as a reference graphic; determining the arrangement order of the graphics in the graphics group according to the relative position of the position of the reference graphic and the center position, and the relative position of the positions of other graphics in the graphics group except the reference graphic and the center position; wherein, the determination of the arrangement order of the graphics in the graphics group according to the relative position of the position of the reference graphic and the center position, and the relative position of the positions of other graphics in the graphics group except the reference graphic and the center position The positions of other graphics except the reference graphics and the relative positions of the center position to determine the arrangement order between the graphics in the graphics group, including: taking the center position as the starting point, determining the line between the center position and the centroid of the reference graphics as a reference vector, wherein the position of the graphics includes the coordinates of the centroid of the graphics; taking the center position as the starting point, determining the lines between the center position and the centroids of the other graphics as numbered vectors, and determining the angles between the numbered vectors and the reference vectors; sorting the numbered vectors based on the size of the angle; and determining the arrangement order between the graphics in the graphics group according to the sorting between the numbered vectors; The target information corresponding to the graphic group is determined according to the graphics in the graphic group and the arrangement order, wherein different arrangement orders represent different target information.
2. The method according to claim 1, characterized in that The step of respectively determining the position of each graphic in the graphic group comprises: Determine the centroid coordinates of each graphic in the graphic group respectively by using a graphic recognition algorithm; The centroid coordinates of each of the graphics are determined as the position of each of the graphics.
3. The method according to claim 1, characterized in that Determining the center position of the graphic group includes: The center position of the graphic group is determined based on the position of each graphic.
4. The method according to claim 3, characterized in that The determining the center position of the graphic group based on the position of each graphic comprises: respectively determining the maximum and minimum values of the abscissas in the centroid coordinates, wherein the position of each graphic includes the centroid coordinates; respectively determining the maximum and minimum values of the ordinates in the centroid coordinates; The center position is determined based on the maximum and minimum values of the abscissa and the maximum and minimum values of the ordinate.
5. The method according to claim 4, characterized in that The determining the center position based on the maximum value and the minimum value of the horizontal coordinate and the maximum value and the minimum value of the vertical coordinate comprises: Determine the average value of the maximum value and the minimum value of the horizontal coordinate as the horizontal coordinate of the center position; The average value of the maximum value and the minimum value of the ordinate is determined as the ordinate of the center position.
6. The method according to any one of claims 1 to 5, characterized in that: Also includes: The target information is displayed.
7. An information recognition device, characterized in that: include: A first determination module is used to respectively determine the position of each graphic in the graphic group in the image to be identified and the center position of the graphic group; a second determining module, configured to determine the arrangement order of the graphics in the graphics group according to the position of each graphic and the center position; wherein the determining the arrangement order of the graphics in the graphics group according to the position of each graphic and the center position comprises: determining any one of the graphics in the graphics group as a reference graphic; determining the arrangement order of the graphics in the graphics group according to the relative position of the reference graphic and the center position, and the relative position of the positions of other graphics in the graphics group except the reference graphic and the center position; wherein the determining the arrangement order of the graphics in the graphics group according to the relative position of the reference graphic and the center position, and the The positions of other graphics in the graphic group except the reference graphic and the relative positions of the center position to determine the arrangement order between the graphics in the graphic group, including: taking the center position as the starting point, determining the line between the center position and the centroid of the reference graphic as the reference vector, wherein the position of the graphic includes the coordinates of the centroid of the graphic; taking the center position as the starting point, determining the lines between the center position and the centroids of the other graphics as numbered vectors, and determining the angles between the numbered vectors and the reference vectors; sorting the numbered vectors based on the size of the angle; and determining the arrangement order between the graphics in the graphic group according to the sorting between the numbered vectors; The identification module is used to determine the target information corresponding to the graphic group according to the graphics in the graphic group and the arrangement order, wherein different arrangement orders represent different target information.
8. An electronic device, characterized in that: The electronic device comprises: one or more processors; A storage device for storing one or more programs; When the one or more programs are executed by the one or more processors, the one or more processors implement the method according to any one of claims 1 to 6.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the method according to any one of claims 1 to 6 is implemented.
Citation Information
Patent Citations
Text recognition method and device, equipment and storage medium
CN111985465A