Page Color Management Method, System, Device and Storage Medium for Semantic Tags

Through the page color management method of semantic tags, image recognition technology is used to analyze and screen the web page, which solves the problem of confusion in web pages, and achieves the unity and distinction of colors, reduces manpower verification, and improves user experience.

CN114372222BActive Publication Date: 2025-06-27SHANGHAI GARLIC SPROUT INFORMATION TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210021256.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-01-10
Publication Date
2025-06-27
Estimated Expiration
2042-01-10

AI Technical Summary

Technical Problem

In web development, complex websites cause color confusion due to a large number of CSS code and repeated color values, especially in collaborative development of multiple people and complex pages, these problems are difficult to detect and solve.

Method used

Through the page color management method of semantic labels, image recognition technology is used to perform pattern segmentation and color analysis on the page, establish a semantic label and color mapping relationship table, filter out optional color gamut, reduce manpower verification, and ensure uniformity and distinction of colors.

Benefits of technology

It effectively avoids the color confusion of different types of subjects in the page, ensures the consistent color of similar subjects, reduces the work of human verification, enhances the auxiliary functions of web design, and improves the user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114372222B_ABST
    Figure CN114372222B_ABST
Patent Text Reader

Abstract

The present invention provides a method, system, device and storage medium for page color management of semantic tags. The method includes: performing pattern segmentation on the pages in the page set based on the first image recognition to obtain the first type of semantic tags corresponding to each pattern after segmentation; performing the second image recognition on the local areas of different colors of each pattern respectively, and establishing a mapping relationship table of the second type of semantic tags corresponding to the local areas, the range of the local areas, and the current color; screening out the ranges with coordinates close to the current color corresponding to the second type of semantic tags in the optional color gamut coordinate system corresponding to the page set, and using the remaining optional color gamut as the optional range for adding new colors in subsequent pages. The present invention can effectively avoid the color chaos of different types of main bodies in the page, can effectively unify the colors of the same type of main bodies, ensure clear colors between different main bodies, reduce the work of manual checking, enhance the auxiliary function of web design, and improve the user experience.
Need to check novelty before this filing date? Find Prior Art

Description

Background Art

[0002] As front-end technologies become increasingly important in web development, the proportion of front-end developers using animations in projects is increasing, and more and more cool animations need to be displayed on mobile devices. However, complex websites usually have a large amount of CSS code, and there are often many duplicate values. For example, the same color value may be used in hundreds or thousands of places. If this value changes, it is necessary to search globally and replace it one by one. Custom properties store a value in one place and then reference it in many other places. Another advantage is semantic identification. For example, --main-text-color is more understandable than #00ff00, especially when this color value is also used in other contexts.

[0003] Moreover, in order to make various types of information on the page more distinct, the same color is preferably used to represent the same-level labels or partial positions of the same pattern, etc. However, if it is collaborative development by multiple people, or when the page is too complex, usually designers arbitrarily select colors based on design aesthetics and personal feelings, which is likely to cause color chaos during the development process, and it is difficult for developers themselves to discover this part of the problem in the vast number of web pages.

[0004] Therefore, the present invention provides a method, system, device, and storage medium for page color management with semantic tags. Summary of the Invention

[0005] Aiming at the problems in the prior art, the purpose of the present invention is to provide a method, system, device, and storage medium for page color management with semantic tags, which overcomes the difficulties of the prior art, can effectively avoid color chaos of different types of entities on the page, can effectively unify the colors of similar entities, ensure clear colors between different entities, reduce the workload of manual verification, enhance the auxiliary function of web design, and improve the user experience.

[0006] An embodiment of the present invention provides a method for page color management with semantic tags, including the following steps:

[0007] S110. Perform pattern segmentation on the pages in the page set based on the first image recognition to obtain the first type of semantic tags corresponding to each of the patterns after segmentation;

[0008] S120. Perform a second image recognition on the local areas of different colors of each pattern respectively, and establish a mapping relationship table of the second type of semantic tags corresponding to the local areas, the range of the local areas, and the current colors; and

[0009] S130. In the optional color gamut coordinate system corresponding to the page set, screen out the range with coordinates close to the coordinates of the current color corresponding to the second type of semantic label, and use the remaining optional color gamut as the optional range for adding new colors in subsequent pages.

[0010] Preferably, step S120 includes:

[0011] S121. Perform a second image recognition on the local areas of different colors of each pattern respectively, and at least obtain the second type of semantic label corresponding to the local area, the range area of the planar coordinates of the local area in the page, and the coordinate value of the current color of the local area in the optional color gamut coordinate system; and

[0012] S122. Establish a mapping relation table for the second type of semantic label of the local area, the range area of the planar coordinates, and the coordinate value in the optional color gamut coordinate system.

[0013] Preferably, step S130 includes:

[0014] S131. In the optional color gamut coordinate system corresponding to the page set, use the coordinates of the current color corresponding to the second type of semantic label as the center of a circle, and use a preset length as the radius to establish a circular area corresponding to the used color; and

[0015] S132. Screen out the circular area of the used color in the optional color gamut coordinate system, and use the remaining area of the optional color gamut as the optional range for adding new colors in subsequent pages.

[0016] Preferably, after step S130, it further includes:

[0017] S140. Fill a number of non-overlapping circles with a preset length as the radius in the optional range, and use the color corresponding to the coordinates of the center of at least one of the circles as an option for adding a new color in subsequent pages.

[0018] Preferably, after step S130, it further includes:

[0019] S150. Collect the same second type of semantic labels as a second type of semantic label group. When the current color of a local area in the second type of semantic label group is changed to a target color, synchronously change the current colors of all local areas in the second type of semantic label group to the target color.

[0020] Preferably, before step S110, it further includes:

[0021] S100. Train a neural network for image recognition. The labels output by the neural network include at least several first - type semantic labels. The first - type semantic labels include pattern - type labels and text - type labels. The text - type labels include one or a combination of theme, title, text, and page number. The labels output by the neural network also include several second - type semantic labels. At least one of the pattern - type labels has a mapping relationship with a group of the second - type semantic labels.

[0022] Preferably, the step S120 includes the following steps:

[0023] S123. When the pattern after segmentation has a first - type semantic label; and

[0024] S124. Perform a second image recognition on the local regions of different colors of each pattern respectively, and increase the confidence of the second - type semantic label corresponding to the first - type semantic label. Take the second - type semantic label with the highest confidence as the recognition result of the local region.

[0025] An embodiment of the present invention also provides a page color management system for semantic labels, which is used to implement the above - mentioned page color management method for semantic labels. The page color management system for semantic labels includes:

[0026] A first - type semantic module that performs pattern segmentation on the pages in the page set based on the first image recognition, and obtains the first - type semantic label corresponding to each pattern after segmentation;

[0027] A second - type semantic module that performs a second image recognition on the local regions of different colors of each pattern respectively, and establishes a mapping relationship table of the second - type semantic label corresponding to the local region, the range of the local region, and the current color; and

[0028] An optional range module that screens out the ranges with coordinates close to the current color corresponding to the second - type semantic label in the optional color gamut coordinate system corresponding to the page set, and takes the remaining optional color gamut as the optional range for adding new colors in subsequent pages.

[0029] An embodiment of the present invention also provides a page color management device for semantic labels, including:

[0030] A processor;

[0031] A memory that stores executable instructions of the processor;

[0032] Wherein, the processor is configured to execute the steps of the above - mentioned page color management method for semantic labels by executing the executable instructions.

[0033] An embodiment of the present invention also provides a computer-readable storage medium for storing a program, which when executed implements the steps of the above-mentioned page color management method for semantic tags.

[0034] The purpose of the present invention is to provide a page color management method, system, device and storage medium for semantic tags, which can effectively avoid color chaos of different types of main bodies on the page, can effectively unify the colors of homogeneous main bodies, ensure clear colors between different main bodies, reduce the work of manual verification, enhance the auxiliary function of web design, and improve the user experience. BRIEF DESCRIPTION OF THE DRAWINGS

[0035] By reading the following detailed description of non-limiting embodiments with reference to the accompanying drawings, other features, objects and advantages of the present invention will become more apparent.

[0036] Figure 1 It is a flowchart of the page color management method for semantic tags of the present invention.

[0037] Figures 2 to 5 It is a schematic diagram of the implementation process of the page color management method for semantic tags of the present invention.

[0038] Figure 6 It is a module schematic diagram of the page color management system for semantic tags of the present invention.

[0039] Figure 7 It is a structural schematic diagram of the page color management device for semantic tags of the present invention.

[0040] Figure 8 It is a structural schematic diagram of a computer-readable storage medium according to an embodiment of the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS

[0041] The following illustrates the embodiments of the present application through specific examples. Those skilled in the art can easily understand other advantages and effects of the present application from the content disclosed in the present application. The present application can also be implemented or applied through other different specific embodiments. Various details in the present application can also be modified or changed according to different viewpoints and application systems without departing from the spirit of the present application. It should be noted that, without conflict, the embodiments and features in the embodiments of the present application can be combined with each other.

[0042] The following takes the accompanying drawings as a reference and details the embodiments of the present application so that those skilled in the technical field to which the present application belongs can easily implement it. The present application can be embodied in many different forms and is not limited to the embodiments described herein.

[0043] In the descriptions of this application, the descriptions referring to terms such as "one embodiment", "some embodiments", "example", "specific example", or "some examples" etc. mean that the specific features, structures, materials, or characteristics represented in connection with the embodiment or example are included in at least one embodiment or example of this application. Moreover, the specific features, structures, materials, or characteristics represented can be combined in a suitable manner in any one or more embodiments or examples. In addition, without contradiction, those skilled in the art can combine and combine the different embodiments or examples represented in this application and the features of different embodiments or examples.

[0044] In addition, the terms "first" and "second" are only used for indicating purposes and cannot be understood as indicating or implying relative importance or implicitly specifying the quantity of the indicated technical features. Thus, the features defined with "first" and "second" can explicitly or implicitly include at least one of such features. In the descriptions of this application, the meaning of "a plurality of" is two or more, unless otherwise specifically defined.

[0045] To clearly illustrate this application, devices irrelevant to the description are omitted, and the same or similar components throughout the specification are given the same reference numerals.

[0046] Throughout the specification, when it is said that a device is "connected" to another device, this includes not only the case of "direct connection", but also the case of "indirect connection" with other elements placed therebetween. In addition, when it is said that a certain device "includes" a certain component, unless there is a particularly contrary record, it does not exclude other components, but means that other components can also be included.

[0047] When it is said that a device is "on" another device, this can be directly on the other device, but there can also be other devices therebetween. When it is said that a device is "directly" "on" another device, there are no other devices therebetween.

[0048] Although in some instances the terms first, second, etc. are used herein to denote various elements, these elements should not be limited by these terms. These terms are only used to distinguish one element from another. For example, a first interface and a second interface, etc. are indicated. Furthermore, as used herein, the singular forms "a", "an" and "the" are also intended to include the plural forms unless the context clearly dictates otherwise. It should be further understood that the terms "comprises", "comprising" indicate the presence of the features, steps, operations, elements, components, items, kinds, and / or groups, but do not preclude the presence, occurrence or addition of one or more other features, steps, operations, elements, components, items, kinds, and / or groups. The terms "or" and "and / or" used herein are to be construed as inclusive, or meaning any one or any combination. Thus, "A, B or C" or "A, B and / or C" means "any of the following: A; B; C; A and B; A and C; B and C; A, B and C". This definition will only be an exception when the combination of elements, functions, steps or operations are mutually exclusive in some way.

[0049] The technical terms used herein are only for referring to specific embodiments and are not intended to limit the present application. The singular forms used herein also include the plural forms as long as the statements do not clearly indicate the contrary meaning. The meaning of "comprising" used in the specification is to embody specific characteristics, regions, integers, steps, operations, elements and / or components, and does not exclude the existence or addition of other characteristics, regions, integers, steps, operations, elements and / or components.

[0050] Although not differently defined, including the technical terms and scientific terms used herein, all terms have the same meaning as generally understood by those skilled in the technical field to which the present application pertains. Terms defined in commonly used dictionaries are additionally interpreted to have meanings consistent with the relevant technical literature and the content currently presented. As long as they are not defined, they should not be over-interpreted as ideal or overly formulaic meanings.

[0051] Figure 1 is a flowchart of a page color management method for semantic tags of the present invention. As Figure 1 shown, an embodiment of the present invention provides a page color management method for semantic tags, including the following steps:

[0052] S110. Perform pattern segmentation on the pages in the page set based on the first image recognition to obtain the first type of semantic tags corresponding to each pattern after segmentation.

[0053] S120. Perform the second image recognition on the local regions of different colors of each pattern respectively, and establish a mapping relationship table of the second type of semantic tags corresponding to the local regions, the range of the local regions, and the current color. And

[0054] S130. In the optional color gamut coordinate system corresponding to the page set, filter out the ranges with coordinates close to the coordinates of the current color corresponding to the second type of semantic label, and use the remaining optional color gamut as the optional range for adding new colors in subsequent pages.

[0055] The color gamut in this embodiment is a method of encoding a color, and also refers to the sum of colors that a technical system can produce. In computer graphics processing, the color gamut is a complete subset of colors. The most common application of the color subset is to accurately represent a given situation. For example, a given color space or the color rendering range of a certain output device. The color gamut refers to the range area composed of the colors that a certain color representation mode can express, and also refers to the color range that specific devices, such as monitors, printers, etc., can reproduce in printing and copying. The colors that make up the visible spectrum in nature form the largest color gamut space, which contains all the colors that the human eye can see and can be represented by the CIELAB color space. The size of the color gamut space of a device is related to the device, medium, and viewing conditions. The larger the color gamut space of a device, the more colors it can reproduce.

[0056] In a preferred embodiment, step S120 includes:

[0057] S121. Perform a second image recognition on the local areas of different colors of each pattern, and at least obtain the second type of semantic label corresponding to the local area, the range area of the planar coordinates of the local area in the page, and the coordinate value of the current color of the local area in the optional color gamut coordinate system; and

[0058] S122. Establish a mapping relationship table for the second type of semantic label of the local area, the range area of the planar coordinates, and the coordinate value in the optional color gamut coordinate system.

[0059] In this embodiment, the first image recognition and the second image recognition use the same existing or future-invented neural network for image recognition, but are not limited thereto. And when performing the second image recognition on the pattern that obtains the first type of semantic label through the first image recognition, the confidence level of the second type of semantic label related to the first type of semantic label will be improved during the recalculation process, thereby enhancing the recognition accuracy of the second image recognition.

[0060] In a preferred embodiment, step S130 includes:

[0061] S131. In the optional color gamut coordinate system corresponding to the page set, use the coordinates of the current color corresponding to the second type of semantic label as the center of the circle and a preset length as the radius to establish a circular area corresponding to the used colors; and

[0062] S132. In the optional color gamut coordinate system, screen out the circular areas of the used colors, and use the remaining areas of the optional color gamut as the optional range for adding new colors in the subsequent pages.

[0063] In a preferred embodiment, after step S130, the following steps are further included:

[0064] S140. Fill a number of non-overlapping circles with a preset radius in the optional range, and use the color corresponding to the coordinates of the center of at least one circle as an optional item for adding a new color in the subsequent pages.

[0065] In a preferred embodiment, after step S130, the following steps are further included:

[0066] S150. Collect the same second type of semantic tags as a second type of semantic tag group. When the current color of a local area in the second type of semantic tag group is changed to a target color, synchronously change the current colors of all local areas in the second type of semantic tag group to the target color based on the second type of semantic tag group and the mapping relation table.

[0067] In a preferred embodiment, before step S110, the following steps are further included:

[0068] S100. Train a neural network for image recognition. The labels output by the neural network at least include a number of first type of semantic tags. The first type of semantic tags include pattern type tags and text type tags. The text type tags include one or a combination of theme, title, text, and page number. The labels output by the neural network also include a number of second type of semantic tags. At least one pattern type tag has a mapping relation with a group of second type of semantic tags.

[0069] In a preferred embodiment, step S120 includes the following steps:

[0070] S123. When the segmented pattern has a first type of semantic tag; and

[0071] S124. Perform a second image recognition on the local areas of different colors of each pattern respectively, and increase the confidence of the second type of semantic tags corresponding to the first type of semantic tags. Use the second type of semantic tag with the highest confidence as the recognition result of the local area.

[0072] The present invention has currently been applied to multiple scenarios in OTA industry text classification. After our measurement, this method effectively improves the accuracy of current text classification, improves production efficiency, and reduces the consumption of human and material resources.

[0073] Figures 2 to 5 is a schematic diagram of the implementation process of the page color management method of the semantic tags of the present invention. Refer to Figures 2 to 5As shown in the figure, the implementation process of the page color management method for semantic tags of the present invention is as follows:

[0074] First, train a neural network for image recognition. The tags output by the neural network at least include several first-class semantic tags. The first-class semantic tags include pattern tags and text tags. The text tags include one or a combination of theme, title, text, and page number. The tags output by the neural network also include several second-class semantic tags. At least one pattern tag has a mapping relationship with a group of second-class semantic tags. In this embodiment, the first-class semantic tag includes a portrait. The first-class semantic tag "portrait" has a mapping relationship with a group of second-class semantic tags, and this group of second-class semantic tags includes "face" and "body".

[0075] See Figure 2 , through pattern segmentation of page 30 in the page set of the website based on the first image recognition, obtain the first-class semantic tags corresponding to each pattern after segmentation, where the area corresponding to the first-class semantic tag "portrait" 31 and the area corresponding to the first-class semantic tag "background" 32 are included.

[0076] See Figure 3 , then perform a second image recognition on the local areas of different colors of each pattern (the area corresponding to the first-class semantic tag "portrait" 31). When the pattern after segmentation has a first-class semantic tag, perform a second image recognition on the local areas of different colors of each pattern, and increase the confidence levels of the second-class semantic tags "face" and "body" corresponding to the first-class semantic tag "portrait". Take the second-class semantic tag with the highest confidence level as the recognition result of the local area. Obtain the area corresponding to the second-class semantic tag "face" 311 and the area corresponding to the second-class semantic tag "body" 312. Establish a mapping relationship table of the ranges and current colors of the local areas corresponding to the second-class semantic tags "face" 311 and "body" 312 respectively. In this embodiment, the current color of the first-class semantic tag "background" 32 is the color corresponding to point 11 in the optional color gamut coordinate system. The current color of the second-class semantic tag "face" 311 is the color corresponding to point 12 in the optional color gamut coordinate system. The current color of the second-class semantic tag "body" 312 is the color corresponding to point 13 in the optional color gamut coordinate system.

[0077] See Figure 4 , in the optional color gamut coordinate system 10 corresponding to the page set, with the coordinates (point 11, point 12, point 13) corresponding to the current colors of the second-class semantic tags as the centers, and a preset length L as the radius, establish circular areas corresponding to the used colors. ( Figure 4 The dotted circles in

[0078] In the optional color gamut coordinate system, the circular areas of the used colors are screened out (i.e., the areas of the dotted circles are screened out), and the remaining areas of the optional color gamut (the areas in the color gamut excluding the three circles) are used as the optional range for adding new colors in the subsequent pages. New colors can be selected from the remaining range. The colors selected in this way have a large distance from the three used colors in the color gamut plane, thus avoiding confusion with the used colors and making the page colors of the web page distinct.

[0079] See Figure 5 , in the remaining optional range, several non-overlapping circles are filled with a preset length L as the radius, and the colors corresponding to the coordinates of the centers 21, 22, 23, 24 of these circles are used as the optional items for adding new colors in the subsequent pages. When the user needs to use colors to create a new title or fill a new pattern, the used colors can be automatically avoided. In this way, optional items for using new colors can be automatically provided for the user, and it is ensured that there is a large distance between the new colors in the color gamut plane, further avoiding confusion between the new colors.

[0080] Finally, the same second-class semantic tags are collected as the second-class semantic tag group. When the current color of a local area in the second-class semantic tag group is changed to the target color, the current colors of all local areas in the second-class semantic tag group are synchronously changed to the target color. For example, the user can replace the current color A of all local areas with the label "face" in the page set of the website with a new color B. Then, the current color A of all local areas with the label "face" (which can be in different pages) in the page set will be replaced with the new color B, thus realizing the synchronous replacement of the colors of the local areas with the same label (i.e., the same subject) based on the semantic tags between multiple pages and avoiding the cost of manual replacement page by page.

[0081] The present invention has been currently applied to multiple scenarios in the text classification of the OTA industry. After our calculation, this method effectively improves the accuracy of the current text classification, improves the production efficiency, and reduces the loss of human and material resources.

[0082] Figure 6 It is a schematic diagram of the modules of the page color management system of the semantic tags of the present invention. As shown in FIG. 6, the page color management system 5 of the semantic tags of the present invention includes:

[0083] The first-class semantic module 51 performs pattern segmentation on the pages in the page set based on the first image recognition, and obtains the first-class semantic tags corresponding to each pattern after segmentation.

[0084] The second type of semantic module 52 performs a second image recognition on the local regions of different colors of each pattern, and establishes a mapping relationship table of the second type of semantic labels corresponding to the local regions, the ranges of the local regions, and the current colors.

[0085] The optional range module 53 screens out the ranges with coordinates close to the current color corresponding to the second type of semantic label in the optional color gamut coordinate system corresponding to the page set, and uses the remaining optional color gamut as the optional range for adding new colors in subsequent pages. And

[0086] The optional color module 54 fills a number of non-overlapping circles with a preset length as the radius in the optional range, and uses the color corresponding to the coordinates where the center of at least one circle is located as an option for adding new colors in subsequent pages.

[0087] The synchronous replacement module 55 collects the same second type of semantic labels as the second type of semantic label group. When the current color of a local region in the second type of semantic label group is changed to the target color, the current colors of all local regions in the second type of semantic label group are synchronously changed to the target color.

[0088] The page color management system with semantic labels of the invention can effectively avoid the color chaos of different types of entities on the page, can effectively unify the colors of similar entities, ensure clear colors between different entities, reduce the work of manual checking, enhance the auxiliary function of web design, and improve the user experience.

[0089] The above embodiments are only preferred examples of the present invention and are not used to limit the present invention. Any equivalent substitution, modification, and change made within the principle of the present invention are within the protection scope of the present invention.

[0090] The embodiment of the present invention also provides a page color management device with semantic labels, including a processor. A memory that stores executable instructions of the processor. Among them, the processor is configured to execute the steps of the page color management method with semantic labels by executing the executable instructions.

[0091] As shown above, the page color management system with semantic labels of the present invention can effectively avoid the color chaos of different types of entities on the page, can effectively unify the colors of similar entities, ensure clear colors between different entities, reduce the work of manual checking, enhance the auxiliary function of web design, and improve the user experience.

[0092] Those skilled in the art can understand that various aspects of the present invention can be implemented as a system, a method, or a program product. Therefore, various aspects of the present invention can be specifically implemented in the following forms, namely: a complete hardware implementation, a complete software implementation (including firmware, microcode, etc.), or an implementation combining hardware and software aspects, which can be collectively referred to as "circuit", "module", or "platform" here.

[0093] Figure 7 It is a schematic structural diagram of a page color management device of the semantic tag of the present invention. The following will refer to Figure 7 to describe the electronic device 600 according to this embodiment of the present invention. Figure 7 The electronic device 600 shown is only an example and should not impose any limitations on the functions and usage scope of the embodiments of the present invention.

[0094] As Figure 7 shown, the electronic device 600 is presented in the form of a general-purpose computing device. The components of the electronic device 600 may include but are not limited to: at least one processing unit 610, at least one storage unit 620, a bus 630 connecting different platform components (including the storage unit 620 and the processing unit 610), a display unit 640, etc.

[0095] Among them, the storage unit stores program codes, and the program codes can be executed by the processing unit 610, so that the processing unit 610 executes the steps according to various exemplary embodiments of the present invention described in the above-mentioned electronic prescription transfer processing method part of this specification. For example, the processing unit 610 can execute the steps as shown in Figure 1 shown.

[0096] The storage unit 620 may include a readable medium in the form of a volatile storage unit, such as a random access storage unit (RAM) 6201 and / or a cache storage unit 6202, and may further include a read-only storage unit (ROM) 6203.

[0097] The storage unit 620 may also include a program / utility 6204 having a set (at least one) of program modules 6205. Such program modules 6205 include but are not limited to: an operating system, one or more application programs, other program modules, and program data. The implementation of a network environment may be included in each or some combination of these examples.

[0098] The bus 630 may represent one or more of several types of bus structures, including a storage unit bus or a storage unit controller, a peripheral bus, a graphics acceleration port, a processing unit, or a local bus using any bus structure in a variety of bus structures.

[0099] The electronic device 600 can also communicate with one or more external devices 700 (such as a keyboard, a pointing device, a Bluetooth device, etc.), and can also communicate with one or more devices that enable a user to interact with the electronic device 600, and / or communicate with any device that enables the electronic device 600 to communicate with one or more other computing devices (such as a router, a modem, etc.). Such communication can be carried out through the input / output (I / O) interface 650. Moreover, the electronic device 600 can also communicate with one or more networks (such as a local area network (LAN), a wide area network (WAN), and / or a public network, such as the Internet) through the network adapter 660. The network adapter 660 can communicate with other modules of the electronic device 600 through the bus 630. It should be understood that, although not shown in the figure, other hardware and / or software modules can be used in combination with the electronic device 600, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage platforms, etc.

[0100] An embodiment of the present invention also provides a computer-readable storage medium for storing a program, and the steps of a page color management method for semantic tags are implemented when the program is executed. In some possible implementation manners, various aspects of the present invention can also be implemented in the form of a program product, which includes program code. When the program product runs on a terminal device, the program code is used to cause the terminal device to execute the steps according to various exemplary embodiments of the present invention described in the above-mentioned electronic prescription transfer processing method part of this specification.

[0101] As shown above, the page color management system for semantic tags of the embodiment of the present invention can effectively avoid color chaos of different types of entities on the page, can effectively unify the colors of the same type of entities, ensure clear colors between different entities, reduce the work of manual verification, enhance the auxiliary function of web page design, and improve the user experience.

[0102] Figure 8 is a schematic structural diagram of the computer-readable storage medium of the present invention. Refer to Figure 8 As shown, a program product 800 for implementing the above method according to an embodiment of the present invention is described. It can adopt a portable compact disc read-only memory (CD-ROM) and includes program code, and can run on a terminal device, such as a personal computer. However, the program product of the present invention is not limited thereto. In this document, the readable storage medium can be any tangible medium that contains or stores a program, and this program can be used by or in combination with an instruction execution system, apparatus, or device.

[0103] The program product may employ any combination of one or more readable media. The readable media may be a readable signal medium or a readable storage medium. The readable storage medium may be, for example but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples (a non-exhaustive list) of the readable storage medium include: an electrical connection having one or more wires, a portable 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.

[0104] The computer-readable storage medium may include a data signal propagated in a baseband or as part of a carrier wave, in which the readable program code is carried. Such a propagated data signal may take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the foregoing. The readable storage medium may also be any readable medium other than the readable storage medium, which can send, propagate, or transmit a program for use by or in connection with an instruction execution system, apparatus, or device. The program code contained on the readable storage medium may be transmitted with any appropriate medium, including but not limited to wireless, wired, optical fiber cable, RF, etc., or any suitable combination of the foregoing.

[0105] The program code for performing the operations of the present invention may be written in any combination of one or more programming languages, including object-oriented programming languages such as Java, C++, etc., and also including conventional procedural programming languages such as the "C" language or similar programming languages. The program code may be executed entirely on the user's computing device, partially on the user's device, executed as a stand-alone software package, partially on the user's computing device and partially on a remote computing device, or entirely on the remote computing device or server. In the case of a remote computing device, the remote computing device may be connected to the user's computing device through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computing device (e.g., by using an Internet service provider to connect through the Internet).

[0106] In summary, the object of the present invention is to provide a method, system, device, and storage medium for page color management of semantic tags, which can effectively avoid color chaos of different types of entities on a page, can effectively unify the colors of homogeneous entities, ensure clear colors between different entities, reduce the work of manual checking, enhance the auxiliary function of web design, and improve the user experience.

[0107] The above content is a further detailed description of the present invention in combination with specific preferred embodiments. It cannot be determined that the specific implementation of the present invention is only limited to these descriptions. For those of ordinary skill in the technical field to which the present invention pertains, without departing from the concept of the present invention, several simple deductions or substitutions can be made, and all should be regarded as belonging to the protection scope of the present invention.

Claims

1. A method for page color management of semantic tags, characterized in that, Including the following steps: S110. Perform pattern segmentation on the pages in the page set based on the first image recognition to obtain the first type of semantic labels corresponding to each of the patterns after segmentation; S120. Perform a second image recognition on the local regions of different colors of each of the patterns respectively, and establish a mapping relationship table of the second type of semantic labels corresponding to the local regions, the range of the local regions, and the current color; S130. In the optional color gamut coordinate system corresponding to the page set, use the coordinate corresponding to the current color of the second type of semantic label as the center of a circle, and use a preset length as the radius to establish a circular region corresponding to the used color; in the optional color gamut coordinate system, screen out the circular regions of the used color, and use the remaining regions of the optional color gamut as the optional range for adding new colors in subsequent pages; S140. Fill a number of non-overlapping circles with a preset length as the radius in the optional range, and use the color corresponding to the coordinate where the center of at least one of the circles is located as an option for adding a new color in subsequent pages, and the distance between the centers of the circles in the optional color gamut coordinate system is greater than or equal to twice the preset length; And S150. Collect the same second type of semantic labels as a second type of semantic label group. When the current color of a local region in the second type of semantic label group is changed to a target color, synchronously change the current colors of all the local regions in the second type of semantic label group to the target color.

2. The method for page color management of semantic tags according to claim 1, wherein The step S120 includes: S121. Perform a second image recognition on the local regions of different colors of each of the patterns respectively, and at least obtain the second type of semantic labels corresponding to the local regions, the range region of the planar coordinates of the local regions in the page, and the coordinate value of the current color of the local region in the optional color gamut coordinate system; and S122. Establish a mapping relationship table of the second type of semantic labels, the range region of the planar coordinates, and the coordinate values in the optional color gamut coordinate system of the local regions.

3. The method for page color management of semantic tags according to claim 1, wherein Before the step S110, it further includes: S100. Train a neural network for image recognition. The labels output by the neural network at least include a number of first type of semantic labels. The first type of semantic labels include pattern type labels and text type labels. The text type labels include one or a combination of theme, title, text, and page number. The labels output by the neural network also include a number of second type of semantic labels. At least one of the pattern type labels has a mapping relationship with a group of the second type of semantic labels.

4. The page color management method for semantic tags according to claim 3, wherein The step S120 includes the following steps: S123. When the pattern after segmentation has a first type of semantic label; and S124. Perform a second image recognition on the local regions of different colors of each of the patterns respectively, and increase the confidence level of the second type of semantic label corresponding to the first type of semantic label, and use the second type of semantic label with the highest confidence level as the recognition result of the local region.

5. A page color management system for semantic tags, which is used to implement the page color management method for semantic tags described in claim 1, and is characterized in that Including: A first type of semantic module that performs pattern segmentation on the pages in the page set based on the first image recognition to obtain the first type of semantic labels corresponding to each of the patterns after segmentation; The second type of semantic module performs a second image recognition on the local regions of different colors of each of the patterns, and establishes a mapping relationship table of the second type of semantic labels corresponding to the local regions, the range of the local regions, and the current color; The optional range module, in the optional color gamut coordinate system corresponding to the page set, uses the coordinate corresponding to the current color corresponding to the second type of semantic label as the center of a circle, and a preset length as the radius, to establish a circular area corresponding to the used color; in the optional color gamut coordinate system, the circular area of the used color is screened out, and the remaining area of the optional color gamut is used as the optional range for adding new colors in subsequent pages; The optional color module fills a number of non-overlapping circles with a preset length as the radius in the optional range, and uses the color corresponding to the coordinate where the center of at least one of the circles is located as an option for adding a new color in subsequent pages, and the distance between the centers of the circles in the optional color gamut coordinate system is greater than or equal to twice the preset length; and The synchronous replacement module collects the same second type of semantic labels as a second type of semantic label group. When the current color of a local region in the second type of semantic label group is changed to a target color, the current colors of all the local regions in the second type of semantic label group are synchronously changed to the target color.

6. A page color management device for semantic tags, characterized in that, including: a processor; a memory, which stores executable instructions of the processor; wherein, the processor is configured to execute the steps of the page color management method of the semantic label according to any one of claims 1 to 4 by executing the executable instructions.

7. A computer-readable storage medium for storing a program, characterized in that, When the program is executed by the processor, it implements the steps of the page color management method of the semantic label according to any one of claims 1 to 4.

Citation Information

Patent Citations

  • Image processing method, device and equipment

    CN109961453A

  • Image processing method and device, readable medium and electronic equipment

    CN111314614A