Data processing method, device, electronic device and computer-readable storage medium
By obtaining the color ratio of the image and applying preset scoring rules to automatically score and optimize image color matching, the problem of low color matching efficiency in the existing technology is solved, and a fast and accurate color matching solution determination is achieved.
Patent Information
- Application Number
- CN202111012616.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-08-31
- Publication Date
- 2025-08-08
- Estimated Expiration
- 2041-08-31
AI Technical Summary
In the prior art, users need to adjust multiple times when designing color matching of images or web pages, resulting in low efficiency of color matching results, lack of standardization and visual fatigue.
By obtaining the first dimension information of the image to be scored, determining its color ratio, and using preset scoring rules to score the image, obtaining the scoring results, and determining the target color scheme based on the scoring results.
It improves the efficiency of color matching, reduces the number of user adjustments, provides intuitive scoring results and optimization suggestions, and improves the accuracy and user experience of the color scheme.
Smart Images

Figure CN114022581B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of image design, and in particular to a data processing method, device, electronic device, and computer-readable storage medium. Background Art
[0002] Currently, when designing the colors of images or web pages, users generally rely on manipulating the colors in the color wheel to achieve color matching and determination. Users need to make multiple adjustments and modifications to the color matching before they can determine a color scheme that meets aesthetic requirements. This wastes users' time and has a low efficiency in determining color matching results. Summary of the Invention
[0003] The embodiment of the present application provides an implementation solution different from the prior art to solve the technical problem of low efficiency in determining color matching results.
[0004] In a first aspect, the present application provides a data processing method, including: obtaining an image to be scored and first dimensional information; using the first dimensional information to determine a first color ratio of the image to be scored; scoring the image to be scored according to the first color ratio and a first preset scoring rule to obtain a first scoring result; and determining a first target color scheme of the image to be scored based on the first scoring result.
[0005] In a second aspect, the present application provides a data processing device, comprising: an acquisition module for acquiring an image to be scored and first dimensional information; a first determination module for determining a first color ratio of the image to be scored using the first dimensional information; a scoring module for scoring the image to be scored according to the first color ratio and a first preset scoring rule to obtain a first scoring result; and a second determination module for determining a first target color scheme of the image to be scored based on the first scoring result.
[0006] In a third aspect, the present application provides an electronic device comprising: a processor; and a memory for storing executable instructions of the processor; wherein the processor is configured to execute the data processing method described in the first aspect or any possible implementation scheme of the first aspect by executing the executable instructions.
[0007] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the data processing method described in the first aspect or any possible implementation manner of the first aspect.
[0008] In a fifth aspect, an embodiment of the present application provides a computer program product, including a computer program, which, when executed by a processor, implements the data processing method described in the first aspect or any possible implementation manner of the first aspect.
[0009] The present application obtains an image to be rated and first dimensional information; uses the first dimensional information to determine a first color ratio of the image to be rated; scores the image to be rated according to the first color ratio and a first preset scoring rule to obtain a first scoring result; and determines a first target color scheme of the image to be rated based on the first scoring result. The application can automatically score the image input by the user according to the preset rules and determine the target color scheme, thereby improving the efficiency of determining the color scheme. BRIEF DESCRIPTION OF THE DRAWINGS
[0010] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the following is a brief introduction to the drawings required for the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present application. For those skilled in the art, other drawings can be obtained based on these drawings without creative work. In the drawings:
[0011] Figure 1 It is a schematic diagram of the hue circle in the prior art;
[0012] Figure 2 A flowchart of a data processing method provided in one embodiment of the present application;
[0013] Figure 3 A flowchart of a data processing method provided in another embodiment of the present application;
[0014] Figure 4 A schematic diagram of the structure of a data processing system provided in one embodiment of the present application;
[0015] Figure 5 A schematic diagram of the structure of a data processing device provided in an embodiment of the present application;
[0016] Figure 6 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0017] The embodiments of the present application are described in detail below, and examples of the embodiments are shown in the accompanying drawings. The embodiments described below with reference to the accompanying drawings are exemplary and intended to be used to explain the present application, but should not be understood as limiting the present application.
[0018] The terms "first" and "second" in the specification, claims and drawings of the embodiments of the present application are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequential order. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the embodiments of the present application described herein can, for example, be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0019] Currently, common color matching methods generally rely on users to manipulate the color wheel based on their visual perception. Specifically, color matching is generally based on the following methods:
[0020] 1) Contrasting colors: hue combinations that are 180° apart on the color wheel (including adjacent colors);
[0021] 2) Same color matching: Specify one color and adjust the corresponding saturation to lighten or darken the color to create a new color.
[0022] 3) Adjacent color matching: Use adjacent color matching based on the adjacent colors on the color wheel.
[0023] 4) Warm color matching: Use red, yellow, orange and other colors for matching.
[0024] 5) Cool color matching: Use green, blue and purple colors for matching.
[0025] The color wheel can be found in Figure 1 As shown, when the above color matching principles based on the color wheel are provided to users to assist them in color matching, there is no standardization of the final color matching. The color matching conclusion is only drawn from a basic level. Moreover, due to the universality of color usage, the user will experience visual fatigue from the color matching. In addition, the user is required to make multiple adjustments and modifications to determine the final desired color, which wastes the user's time and has a low efficiency in determining the color matching result.
[0026] The following specific embodiments describe in detail the technical solution of the present application and how the technical solution of the present application solves the above-mentioned technical problems. The following specific embodiments can be combined with each other, and the same or similar concepts or processes may not be repeated in some embodiments. The embodiments of the present application will be described below in conjunction with the accompanying drawings.
[0027] Figure 2A flowchart of a data processing method provided in an exemplary embodiment of the present application, the method comprising:
[0028] S201, obtaining an image to be rated and first dimension information;
[0029] S202, determining a first color ratio of the image to be rated using the first dimension information;
[0030] S203, scoring the image to be scored according to the first color ratio and a first preset scoring rule to obtain a first scoring result;
[0031] S204: Determine a first target color scheme for the image to be rated based on the first rating result.
[0032] Optionally, the image to be rated may be an image whose color scheme has been preliminarily determined by the user, and the aforementioned first dimension information may be values corresponding to any one or more of the following dimensions: color (RGB), hue, brightness, purity, coldness or warmth;
[0033] The first color ratio in the aforementioned S202 can be the ratio value of the primary color, secondary color, and auxiliary color in the image to be scored corresponding to the first dimension information; specifically, the range of the first dimension information corresponding to the primary color, secondary color, and auxiliary color can be determined according to user setting information.
[0034] Furthermore, in the aforementioned S203, scoring the image to be scored according to the first color ratio and the first preset scoring rule may include the following steps:
[0035] S2031, determining a target ratio range to which the first color ratio belongs in a preset ratio range library;
[0036] S2032: Score the image to be scored based on the target ratio range and a first preset scoring rule.
[0037] The preset ratio range library includes multiple ratio ranges, and the first preset scoring rule may define scoring levels corresponding to different ratio ranges. The scoring levels may be divided into multiple levels, such as excellent, good, passing, and poor; they may also be divided into A, B, C, and D, which are not limited in this application. After determining the target ratio range to which the first color ratio belongs in the preset ratio range library, the target level corresponding to the target ratio range may be determined based on the level correspondence corresponding to the target ratio range in the first preset scoring rule. The target level is then the first scoring result for the image to be scored. The higher the target level, the better the color matching of the image to be scored and the more ideal the color scheme.
[0038] Optionally, for the ratio range in the aforementioned preset ratio range library, the closer the ratio range is to the preset golden ratio, the higher the level corresponding to the ratio range is, wherein the golden ratio is: primary color: secondary color: auxiliary color = 60:30:10.
[0039] Furthermore, in order to further refine the scoring results, the first scoring result may further include a specific evaluation score value in addition to the aforementioned grade result;
[0040] That is, the first preset scoring rule may further specify a correspondence between the first color ratio and the evaluation score. Accordingly, scoring the image to be scored according to the first color ratio and the first preset scoring rule, and obtaining the first scoring result further includes:
[0041] S2033. Determine a target score corresponding to the first color ratio based on a correspondence between the first color ratio and scores in a first preset scoring rule;
[0042] S2034. Determine a first scoring result using the target level and target score.
[0043] The first scoring result may include the aforementioned target level and target score. Furthermore, the present application also includes marking and displaying the first scoring result so that the user can intuitively observe the quality of the current color scheme of the image they input.
[0044] Furthermore, the aforementioned different target levels may correspond to different score ranges, for example: level A corresponds to above 90 points, level B corresponds to 80 to 90 points, level C corresponds to 70 to 80 points, and level D corresponds to 60 to 70 points.
[0045] This application scores the images input by the user through preset scoring rules, so that the user can intuitively observe whether the color matching score of the image meets the standard after completing the design, so as to more quickly determine whether the quality of the color matching of the image meets the standard, thereby facilitating further improvement in quality and color comfort, and avoiding the situation where the user misjudges the color matching and misadjusts the color matching, which reduces the quality, when the color matching is already appropriate.
[0046] Furthermore, after determining the first scoring result, the above method further includes:
[0047] The image to be scored is used as the input parameter of the preset optimization model, the optimization model is executed, and the optimization suggestion information is obtained;
[0048] Display optimization suggestion information.
[0049] The optimization model may be a machine learning model determined based on training of multiple sample images.
[0050] The aforementioned optimization suggestion information may include: matching suggestions for primary colors, secondary colors, and auxiliary colors, missing tones or hues, suggestions for adjusting the proportions of primary colors, secondary colors, and auxiliary colors, etc.
[0051] The aforementioned multiple sample images can be determined based on input information from a manager, or images with more positive reviews can be automatically obtained as sample images. This application does not impose any limitation on this.
[0052] Specifically, the aforementioned matching suggestions may include: matching of complementary colors and similar colors. Two opposite colors are complementary colors, and similar colors are similar colors. It is recommended to use black as the base color, and appropriate underlying adjustments and embellishments can be made. The big data model is unified, and the corresponding proportions can be extracted from bright colors.
[0053] Further, with respect to the aforementioned S204, determining a first target color scheme of the image to be rated based on the first rating result includes:
[0054] If the first scoring result meets the preset requirements, the color scheme corresponding to the first color ratio is used as the first target color scheme;
[0055] If the first scoring result does not meet the preset requirements, then
[0056] Get multiple preset recommended color schemes;
[0057] Relying on multiple recommended color schemes and the image to be scored to generate multiple color matching result images corresponding to the multiple recommended color schemes;
[0058] Based on a user's selection instruction for the plurality of color matching result images, a first target color matching scheme is determined.
[0059] Among them, when the first scoring result reaches the preset level, it is deemed that the first scoring result meets the preset regulations; when it does not reach the preset level, it is deemed that it does not meet the preset regulations. Among them, the preset level can be A or excellent. At this time, the first color ratio belongs to the preset ratio range (the ratio range corresponds to the preset level).
[0060] The color scheme corresponding to the aforementioned first color ratio is the current color scheme of the image to be rated, that is, the color scheme corresponding to the first rating result. Specifically, if the first rating result of the image to be rated is excellent, the color scheme of the image to be rated that resulted in the first rating result is used as the first target color scheme, which is the final color scheme of the image to be rated. The first target color scheme may include the ratios of the primary, secondary, and auxiliary colors corresponding to the first dimension information, as well as complementary color information, similar color information, the proportion of black in the image to be rated, and so on.
[0061] The aforementioned multiple recommended color schemes may be multiple recommended schemes corresponding to the image type of the image to be rated. In some optional embodiments of the present application, the present application further includes:
[0062] Get the image type of the image to be rated;
[0063] Using the image type, multiple recommended color schemes corresponding to the image type are determined from a preset scheme library.
[0064] The image types may be the following: furniture, landscape, sunset, poster, Spring Festival, etc. The correspondence between different recommended color schemes and image types may be set by relevant personnel.
[0065] Furthermore, generating multiple color matching result images corresponding to the multiple recommended color matching schemes based on the image to be rated includes:
[0066] Obtain multiple third color ratios corresponding to multiple recommended color schemes;
[0067] The color of the image to be rated is adjusted according to each of the plurality of third color ratios, so that the color ratio of the image to be rated is adjusted from the first color ratio to the corresponding third color ratio, thereby obtaining the plurality of color matching result images. The recommended color scheme, the third color ratio, and the color matching result images correspond one to one.
[0068] Furthermore, the aforementioned process of generating a plurality of color matching result images corresponding to a plurality of recommended color matching schemes may be performed automatically, or may be performed when a trigger instruction from the user is obtained.
[0069] The aforementioned multiple recommended color schemes in this application can be color schemes marked as "recommended" by the user, or can be color schemes whose corresponding scoring results meet the preset level, or color schemes whose scoring results meet both the preset level and the preset score. Determining the corresponding recommended color scheme based on the type of image can meet user needs more specifically and efficiently.
[0070] Furthermore, in order to further improve the efficiency of determining the color scheme, this solution can also pre-process the image to be rated. Based on this, the above method further includes the following steps:
[0071] S01, analyzing the image to be scored based on preset parameter information to obtain analysis results;
[0072] S02: If the analysis result indicates that the image to be rated meets the first rating requirement, triggering the step of determining a first color ratio of the image to be rated using the first dimension information.
[0073] Specifically, the parameter information may be information about the color depth of the image to be rated. Optionally, the analysis result may be the ratio of the number of pixels in the dark area to the number of pixels in the light area of the image to be rated. When the ratio is within a preset range, the image to be rated is considered to meet the first rating requirement. When the ratio is not within the preset range, the image to be rated is considered to not meet the first rating requirement. The color value range corresponding to dark colors and the color value range corresponding to light colors can be set by the user.
[0074] In some other optional embodiments of the present application, the method further includes:
[0075] S21. If the analysis result indicates that the image to be rated does not meet the first rating requirement, split the image to be rated to obtain multiple sub-images;
[0076] S22, determining whether there is a target sub-image among the multiple sub-images that meets the second scoring requirement; if so, scoring the target sub-image according to a second preset scoring rule to obtain a second scoring result;
[0077] S23: Determine a second target color scheme for the image to be rated based on the second rating result.
[0078] Specifically, when splitting the image to be rated, it can be done in a variety of ways, which are not limited in this application. For example, the image to be rated can be split into equal sizes according to a preset number of parts, or the image to be rated can be split according to a preset split ratio.
[0079] Furthermore, the second scoring requirement can be the same as the first scoring requirement, or can be a scoring requirement specific to a sub-image. Accordingly, when the second scoring requirement is the same as the first scoring requirement, the second preset scoring rule can be the same as the first preset scoring rule. The principle of scoring the target sub-image according to the second preset scoring rule is the same as the principle of scoring the target sub-image according to the first preset scoring rule. For details, please refer to the above content and will not be repeated here.
[0080] After obtaining the second scoring result, if the second scoring result indicates that the score of the target sub-image meets the preset level, for example, the score of the target sub-image is excellent, the current color scheme of the target sub-image is used as the second target color scheme of the image to be scored.
[0081] Specifically, the fourth color ratio of the target sub-image may be obtained, and the color of the image to be rated may be adjusted according to the fourth color ratio, so that the color ratio of the image to be rated is adjusted from the first color ratio to the fourth color ratio.
[0082] It should be noted that when there are multiple target sub-images, multiple second target color schemes are obtained. In this case, the final color scheme of the image to be rated can be further determined according to the user's selection instruction.
[0083] In some optional embodiments of the present application, the method further includes:
[0084] Get the user's rating instructions;
[0085] If the scoring instruction is the first preset instruction, triggering the step of scoring the image to be scored according to the first color ratio and the first preset scoring rule;
[0086] If the scoring instruction is the second preset instruction, obtaining the third preset scoring rule;
[0087] Based on the third preset scoring rule, the image to be scored is scored to obtain a third scoring result.
[0088] Specifically, the aforementioned first preset instruction may be an instruction corresponding to the first operation button for starting detailed scoring, and the aforementioned second preset instruction may be an instruction corresponding to the second operation button for starting rough scoring. Similar to the aforementioned first preset scoring rule, the third preset scoring rule may be limited to: scoring levels corresponding to different proportion ranges, the correspondence between the proportion range and the grade in the third preset scoring rule is different from the correspondence between the proportion range and the grade in the first preset scoring rule, and in the third preset scoring rule and the first preset scoring rule, for the same grade, the proportion range corresponding to the third preset scoring rule is larger than the proportion range of the first preset scoring rule.
[0089] It should be noted that the third preset scoring rule is mostly used for rough estimation, while the first preset scoring rule focuses on accurate scoring, thereby meeting different needs of users.
[0090] Furthermore, in some optional embodiments of the present application, if the first scoring result meets the preset requirements, the method further includes:
[0091] Get the user's add instruction;
[0092] According to the adding instruction, the image to be rated is added to the recommended image set corresponding to the plurality of recommended color schemes, wherein the recommended color schemes correspond one to one to the recommended images in the recommended image set.
[0093] This application proposes a visual color matching scoring and annotation scheme, which uses the professionalism of color matching and different color annotation characteristics to reduce the difficulty of color matching selection in UI design; improves the comfort of users and the use of products, and also improves the efficiency of determining color schemes.
[0094] Figure 3 This is a flow chart of a data processing method provided in another embodiment of the present application, the data processing method comprising:
[0095] S31, start;
[0096] Specifically, the program can be started after the user inputs the image to be rated;
[0097] S32, determining whether the image to be rated meets the first rating requirement, if so, executing the following step S33, if not, executing the following step S321;
[0098] S33, obtaining the user's scoring instruction and determining whether the scoring instruction is the first preset instruction, if so, executing step S34, if not, executing step S331;
[0099] S321, splitting the image to be scored to obtain multiple sub-images;
[0100] S322: Determine whether there is a target sub-image among the multiple sub-images that meets the second scoring requirement; if so, score the target sub-image according to a second preset scoring rule to obtain a second scoring result;
[0101] S34, determining a first color ratio of the image to be rated using the first dimension information;
[0102] S35, scoring the image to be scored according to the first color ratio and a first preset scoring rule to obtain a first scoring result;
[0103] S36. Mark the target scoring result.
[0104] S331, obtaining a third preset scoring rule;
[0105] S332: Score the image to be scored based on a third preset scoring rule to obtain a third scoring result.
[0106] Specifically, Figure 3 The corresponding execution process can be found in Figure 3 As shown, the target scoring result in S36 can be any one of the first scoring result, the second scoring result, and the third scoring result. Furthermore, the number of the aforementioned images to be scored can be multiple, and accordingly, the target scoring result can be any one or more of the first scoring result, the second scoring result, and the third scoring result. The scoring result corresponding to each image to be scored can be annotated to further improve the efficiency of determining the color scheme of multiple images.
[0107] The specific details of this embodiment can be found in the above content and will not be repeated here.
[0108] Figure 4 A schematic diagram of the structure of a data processing system provided by an exemplary embodiment of the present application;
[0109] The system includes: a design draft color matching module 41, a submission module 42, a division module 43, a settlement module 44, and a marking module 45; wherein:
[0110] The design draft color matching module 41 can be used to perform the aforementioned step S203;
[0111] The reporting module 42 may be used to execute the aforementioned steps S201 and S202;
[0112] The division module 43 may be used to perform the aforementioned steps: S21 and S22;
[0113] The settlement module 44 may be used to execute the aforementioned step S204;
[0114] The marking module 45 can be used to display the first scoring result or the second scoring result.
[0115] The specific details of this embodiment can be found in the above content and will not be repeated here.
[0116] Figure 5 A schematic structural diagram of a data processing device provided as an exemplary embodiment of the present application;
[0117] The device includes: an acquisition module 51, a first determination module 52, a scoring module 53, and a second determination module 54; wherein:
[0118] An acquisition module 51 is used to acquire the image to be rated and the first dimension information;
[0119] A first determination module 52 is configured to determine a first color ratio of the image to be rated using the first dimension information;
[0120] A scoring module 53 is configured to score the image to be scored according to the first color ratio and a first preset scoring rule to obtain a first scoring result;
[0121] The second determining module 54 is configured to determine a first target color scheme of the image to be scored based on the first scoring result.
[0122] Optionally, the above device is further used for:
[0123] Analyze the image to be scored based on preset parameter information and obtain analysis results;
[0124] If the analysis result indicates that the image to be rated meets the first rating requirement, the step of determining the first color ratio of the image to be rated using the first dimension information is triggered.
[0125] Optionally, the above device is further used for:
[0126] If the analysis result indicates that the image to be rated does not meet the first rating requirement, the image to be rated is split to obtain multiple sub-images;
[0127] determining whether there is a target sub-image among the multiple sub-images that meets the second scoring requirement, and if so, scoring the target sub-image according to a second preset scoring rule to obtain a second scoring result;
[0128] A second target color scheme for the image to be scored is determined based on the second scoring result.
[0129] Optionally, the above device is further used for:
[0130] Get the user's rating instructions;
[0131] If the scoring instruction is the first preset instruction, triggering the step of scoring the image to be scored according to the first color ratio and the first preset scoring rule;
[0132] If the scoring instruction is the second preset instruction, obtaining the third preset scoring rule;
[0133] Based on the third preset scoring rule, the image to be scored is scored to obtain a third scoring result.
[0134] Optionally, when the second determining module 52 is used to determine the first target color scheme of the image to be rated based on the first rating result, it is specifically used to:
[0135] If the first scoring result meets the preset requirements, the color scheme corresponding to the first color ratio is used as the first target color scheme;
[0136] If the first scoring result does not meet the preset requirements, then
[0137] Get multiple preset recommended color schemes;
[0138] Relying on multiple recommended color schemes and the image to be scored to generate multiple color matching result images corresponding to the multiple recommended color schemes;
[0139] Based on a user's selection instruction for the plurality of color matching result images, a first target color matching scheme is determined.
[0140] Optionally, when the scoring module 53 is used to score the image to be scored according to the first color ratio and the first preset scoring rule, it is specifically used to:
[0141] Determining a target ratio range to which the first color ratio belongs in a preset ratio range library;
[0142] The image to be scored is scored based on the target ratio range and a first preset scoring rule.
[0143] Optionally, if the first scoring result meets the preset requirements, the device is further configured to:
[0144] Get the user's add instruction;
[0145] According to the adding instruction, the image to be rated is added to the image set corresponding to the multiple recommended color schemes.
[0146] It should be understood that the device embodiments and the method embodiments may correspond to each other, and similar descriptions may refer to the method embodiments. To avoid repetition, they will not be described in detail here. Specifically, the device can perform the above-mentioned method embodiments, and the aforementioned and other operations and / or functions of each module in the device are the corresponding processes in each method in the above-mentioned method embodiments, which will not be described in detail here for the sake of brevity.
[0147] The apparatus of the embodiment of the present application is described above from the perspective of functional modules in conjunction with the accompanying drawings. It should be understood that the functional module can be implemented in hardware form, can be implemented by instructions in software form, or can be implemented by a combination of hardware and software modules. Specifically, the steps of the method embodiment in the embodiment of the present application can be completed by the hardware integrated logic circuit and / or software form instructions in the processor, and the steps of the method disclosed in the embodiment of the present application can be directly embodied as being executed by a hardware decoding processor, or can be executed by a combination of hardware and software modules in the decoding processor. Optionally, the software module can be located in a mature storage medium in the art such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory, an electrically erasable programmable memory, a register, etc. The storage medium is located in the memory, and the processor reads the information in the memory and completes the steps in the above method embodiment in conjunction with its hardware.
[0148] Figure 6 : is a schematic block diagram of an electronic device provided in an embodiment of the present application, and the electronic device may include:
[0149] The memory 601 and the processor 602 are configured to store computer programs and transmit the program code to the processor 602. In other words, the processor 602 can call and run the computer program from the memory 601 to implement the method in the embodiment of the present application.
[0150] For example, the processor 602 may be configured to execute the above method embodiments according to instructions in the computer program.
[0151] In some embodiments of the present application, the processor 602 may include but is not limited to:
[0152] General-purpose processor, digital signal processor (DSP), application-specific integrated circuit (ASIC), field-programmable gate array (FPGA) or other programmable logic device, discrete gate or transistor logic device, discrete hardware components, etc.
[0153] In some embodiments of the present application, the memory 601 includes but is not limited to:
[0154] Volatile memory and / or non-volatile memory. Non-volatile memory can be read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), or flash memory. Volatile memory can be random access memory (RAM), which is used as an external cache. By way of example and not limitation, many forms of RAM are available, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate synchronous dynamic random access memory (DDR SDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous link DRAM (SLDRAM), and direct RAM bus random access memory (DR RAM).
[0155] In some embodiments of the present application, the computer program may be divided into one or more modules, which are stored in the memory 601 and executed by the processor 602 to implement the method provided by the present application. The one or more modules may be a series of computer program instruction segments capable of implementing specific functions, and the instruction segments are used to describe the execution process of the computer program in the electronic device.
[0156] like Figure 6 As shown, the electronic device may further include:
[0157] The transceiver 603 may be connected to the processor 602 or the memory 601 .
[0158] The processor 602 may control the transceiver 603 to communicate with other devices. Specifically, the processor 602 may send information or data to other devices or receive information or data sent by other devices. The transceiver 503 may include a transmitter and a receiver. The transceiver 603 may further include one or more antennas.
[0159] It should be understood that the various components in the electronic device are connected via a bus system, wherein the bus system includes not only a data bus but also a power bus, a control bus and a status signal bus.
[0160] The present application also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, can implement the method of the above-mentioned method embodiment. In other words, the present application also provides a computer program product containing instructions, which, when executed by a computer, causes the computer to perform the method of the above-mentioned method embodiment.
[0161] When software is used for implementation, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the process or function according to the embodiment of the present application is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions can be transmitted from one website, computer, server or data center to another website, computer, server or data center via a wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) method. The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that includes one or more available media integrated. The available medium can be a magnetic medium (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a digital video disc (DVD)), or a semiconductor medium (e.g., a solid state drive (SSD)).
[0162] Those skilled in the art will appreciate that the modules and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.
[0163] In the several embodiments provided in this application, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are merely schematic. For example, the division of the modules is merely a logical function division. In actual implementation, there may be other division methods, such as multiple modules or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or modules, which can be electrical, mechanical or other forms.
[0164] Modules described as separate components may or may not be physically separate, and components displayed as modules may or may not be physical modules, i.e., they may be located in one place or distributed across multiple network elements. Some or all of the modules may be selected based on actual needs to achieve the purpose of the present embodiment. For example, the functional modules in the various embodiments of the present application may be integrated into a processing module, or each module may exist physically separately, or two or more modules may be integrated into a single module.
[0165] The above are only specific embodiments of the present application, but the scope of protection of this application is not limited thereto. Any changes or substitutions that can be easily conceived by a person skilled in the art within the technical scope disclosed in this application should be included in the scope of protection of this application. Therefore, the scope of protection of this application should be based on the scope of protection of the claims.
Claims
1. A data processing method, characterized in that: include: Obtain the image to be rated and the first dimension information; Determining a first color ratio of the image to be rated using the first dimensional information; Scoring the image to be scored according to the first color ratio and a first preset scoring rule to obtain a first scoring result; Determining a first target color scheme for the image to be rated based on the first rating result; Analyzing the image to be rated based on preset parameter information to obtain an analysis result; If the analysis result indicates that the image to be rated meets the first rating requirement, triggering the step of determining a first color ratio of the image to be rated using the first dimensional information; If the analysis result indicates that the image to be rated does not meet the first rating requirement, splitting the image to be rated to obtain multiple sub-images; determining whether there is a target sub-image among the multiple sub-images that meets the second scoring requirement, and if so, scoring the target sub-image according to a second preset scoring rule to obtain a second scoring result; Determining a second target color scheme for the image to be rated based on the second rating result; Determining a first target color scheme for the image to be rated based on the first rating result includes: if the first rating result meets a preset requirement, using the color scheme corresponding to the first color ratio as the first target color scheme; if the first rating result does not meet the preset requirement, obtaining a plurality of preset recommended color schemes; generating a plurality of color matching result images corresponding to the plurality of recommended color matching schemes based on the plurality of recommended color matching schemes and the image to be rated; and determining the first target color scheme based on a user's selection instruction for the plurality of color matching result images; If the second scoring result indicates that the score of the target sub-image meets a preset level, the current color scheme of the target sub-image is used as the second target color scheme of the image to be scored.
2. The method according to claim 1, characterized in that The method further comprises: Get the user's rating instructions; If the scoring instruction is a first preset instruction, triggering the step of scoring the image to be scored according to the first color ratio and the first preset scoring rule; If the scoring instruction is the second preset instruction, obtaining a third preset scoring rule; Based on the third preset scoring rule, the image to be scored is scored to obtain a third scoring result.
3. The method according to claim 1, characterized in that Scoring the image to be scored according to the first color ratio and the first preset scoring rule includes: Determining a target ratio range to which the first color ratio belongs in a preset ratio range library; The image to be scored is scored based on the target ratio range and the first preset scoring rule.
4. The method according to claim 1, wherein If the first scoring result meets the preset requirements, the method further includes: Get the user's add instruction; According to the adding instruction, the image to be rated is added to the image set corresponding to the multiple recommended color schemes.
5. A data processing device, characterized in that: include: An acquisition module, used to obtain the image to be rated and the first dimension information; A first determining module, configured to determine a first color ratio of the image to be rated using the first dimensional information; a scoring module, configured to score the image to be scored according to the first color ratio and a first preset scoring rule to obtain a first scoring result; a second determining module, configured to determine a first target color scheme of the image to be rated based on the first rating result; The device is further configured to: analyze the image to be rated based on preset parameter information to obtain an analysis result; if the analysis result indicates that the image to be rated meets the first rating requirement, trigger the step of determining a first color ratio of the image to be rated using the first dimension information; The device is further configured to: if the analysis result indicates that the image to be rated does not meet the first rating requirement, split the image to be rated to obtain multiple sub-images; determine whether there is a target sub-image in the multiple sub-images that meets the second rating requirement; if so, score the target sub-image according to a second preset rating rule to obtain a second rating result; determining a second target color scheme for the image to be rated based on the second rating result; The second determination module, when used to determine a first target color scheme for the image to be rated based on the first rating result, is specifically configured to: if the first rating result meets a preset requirement, use the color scheme corresponding to the first color ratio as the first target color scheme; if the first rating result does not meet the preset requirement, obtain a plurality of preset recommended color schemes; Relying on multiple recommended color schemes and the image to be scored to generate multiple color matching result images corresponding to the multiple recommended color schemes; determining a first target color matching scheme based on a user's selection instruction for the plurality of color matching result images; If the second scoring result indicates that the score of the target sub-image meets a preset level, the current color scheme of the target sub-image is used as the second target color scheme of the image to be scored.
6. An electronic device, characterized in that: include: processor; as well as a memory for storing executable instructions of the processor; The processor is configured to perform the method according to any one of claims 1 to 4 by executing the executable instructions.
7. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the method according to any one of claims 1 to 4 is implemented.
Citation Information
Patent Citations
Image saturation degree adjustment method, terminal and storage medium
CN107705247A