Image forming mode switching method and device, electronic equipment and storage medium

By determining whether the image is a black and white document in the color image forming device and switching to grayscale mode, the problems of slow printing speed and waste of consumables caused by redundancy of color data are solved, and more efficient printing and better user experience are achieved.

CN120339434APending Publication Date: 2025-07-18DALIAN RUITU INTELLIGENT PRINTING TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510442987.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-04-09
Publication Date
2025-07-18

AI Technical Summary

Technical Problem

In the prior art, users choose color mode when selecting black and white documents to print, resulting in redundant color data information, increasing data transmission volume, reducing printing speed, and wasting color consumables, affecting user experience.

Method used

When the user selects the color mode, it is determined whether there is color information in each page of the image. If there is no color information, it will switch to grayscale mode to avoid color data transmission and directly execute printing in grayscale mode.

Benefits of technology

Reduces redundant color information transmission, improves printing speed, extends the service life of consumables, and improves the user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120339434A_ABST
    Figure CN120339434A_ABST
Patent Text Reader

Abstract

The invention provides an image forming mode switching method and device, electronic equipment and a storage medium, and the method comprises the steps: obtaining an image forming mode in an image forming instruction, the image forming mode comprises a color mode and a gray mode, the color mode is used for generating a color image on an imaging medium, and the gray mode is used for generating a gray image on the imaging medium; the grayscale mode is used for generating a grayscale image on the imaging medium; and if the image forming mode in the image forming instruction is a color mode and color information does not exist in each page of image, switching the image forming mode into a gray mode. It can be understood that the color mode is switched to the gray mode, so that the use of the color mode to print the black-and-white document is avoided. In the gray mode, no color data information exists in the control instruction sent by the driving side, so that redundant color information transmission is reduced, the printing speed is increased, the gray mode can avoid use of color consumables, the service life of the consumables is prolonged, and then the user experience is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of image forming technologies, and more particularly to an image forming mode switching method, apparatus, electronic device, and storage medium. Background Art

[0002] An image forming apparatus is a device that forms an image on an imaging medium through an imaging principle, such as a printer, copier, fax machine, multifunction image production and copying device, electrophotographic device, and any other similar device. A color image forming apparatus is a device that can form a color image on an imaging medium.

[0003] In the related art, if a user currently needs to print a black-and-white document, but the user selects the color mode on the driver side, the image forming instruction sent by the driver to the color image forming apparatus will contain color data information. At this time, the black generated on the imaging medium is color black.

[0004] Because the image forming instruction sent by the driver to the color image forming apparatus will contain color data information, and color data information requires more bytes to mark colors. That is to say, the color data information is redundant in the color mode, which will increase the data transmission volume, resulting in a slower image forming speed. Moreover, color black will cause waste of color consumables, increase the cost for the user to use the image forming apparatus, and affect the user experience.

[0005] It should be noted that the information disclosed in the background art part of this application is only intended to deepen the understanding of the general background art of this application, and should not be regarded as an admission or any form of implication that this information constitutes the prior art known to those skilled in the art. Summary of the Invention

[0006] In view of this, this application provides an image forming mode switching method, apparatus, electronic device, and storage medium, which helps to solve the problem in the prior art that because the image forming instruction sent by the driver to the color image forming apparatus contains color data information, and color data information requires more bytes to mark colors. That is to say, the color data information is redundant in the color mode, which will increase the data transmission volume, resulting in a slower image forming speed. Moreover, color black will cause waste of color consumables, increase the cost for the user to use the image forming apparatus, and affect the user experience.

[0007] In a first aspect, an embodiment of this application provides an image forming mode switching method, which is applied to a color image forming apparatus. The method includes: Obtain the image forming mode in the image forming instruction, where the image forming mode includes a color mode and a grayscale mode. The color mode is used to generate a color image on the imaging medium, and the grayscale mode is used to generate a grayscale image on the imaging medium; If the image formation mode in the image formation instruction is the color mode and there is no color information in each page of the image, then switch the image formation mode to the grayscale mode.

[0008] In the embodiments of the present application, when the image formation mode selected by the user is the color mode, it is determined whether there is color information in each page of the image. If there is no color information in each page of the image, then switch the color mode to the grayscale mode, so as to avoid printing black-and-white documents using the color mode. There is no color data information in the control instruction sent by the driving side in the grayscale mode, thereby reducing the transmission of redundant color information, improving the printing speed, and the grayscale mode can avoid the use of color consumables, increase the service life of the consumables, and further enhance the user experience.

[0009] In a possible implementation manner, after obtaining the image formation mode in the image formation instruction, it further includes: If the image formation mode in the image formation instruction is the grayscale mode, then execute the image formation operation according to the image formation instruction.

[0010] In the embodiments of the present application, if the image formation mode in the image formation instruction is not the color mode but the grayscale mode, then directly execute the image formation operation according to the image formation instruction. It can be understood that in the grayscale mode, there is no problem of redundant color information transmission and waste of color consumables. Directly executing the image formation instruction in the grayscale mode can also save computing power and improve the printing speed.

[0011] In a possible implementation manner, before if the image formation mode in the image formation instruction is the color mode and there is no color information in each page of the image, then switch the image formation mode to the grayscale mode, it further includes: Judge whether there is color information in each page of the image; If the image formation mode in the image formation instruction is the color mode and there is color information in any page of the image, then execute the image formation operation according to the image formation instruction.

[0012] In the embodiments of the present application, if the image formation mode in the image formation instruction is the color mode and there is color information in any page of the image, then directly execute the image formation instruction. It can be understood that when the image formation mode in the image formation instruction is consistent with the actual situation of the image, directly executing the image formation instruction can ensure that the effect finally presented on the imaging medium meets the user's expectations, thereby enhancing the user experience.

[0013] In a possible implementation manner, the judging whether there is color information in each page of the image includes: Convert each page image to bitmap format; Determine whether there are colored pixels in each page of the bitmap format image; If there are color pixels in the image of any page in bitmap format, it is determined that there is color information in the image of any page; If no color pixels exist in each page of the image in the bitmap format, it is determined that no color information exists in each page of the image.

[0014] In an embodiment of the present application, a method for determining whether color information exists in each page of an image may be to convert each page of an image into a bitmap format, thereby determining whether color pixels exist in each page of an image in the bitmap format.

[0015] In a possible implementation, determining whether color information exists in each page of the image includes: Determining whether there is color data in the color information in the image forming instruction corresponding to each page image; If color data exists in the color information in the image forming instruction corresponding to any page image, it is determined that color information exists in the any page image; If color data does not exist in the color information in the image forming instruction corresponding to each page of the image, it is determined that no color information exists in each page of the image.

[0016] In the embodiment of the present application, whether the image is a color image is determined by analyzing whether the image formation instruction contains color information. Because the image formation instruction is enhanced metafile data, this data is easy to access and store. Compared with converting the page into a bitmap and then determining whether each pixel is color, directly determining whether a page of image formation instructions contains color information can increase processing speed, thereby increasing printing speed and improving user experience.

[0017] In a possible implementation, determining whether color information exists in each page of the image includes: Determine page by page whether there is color information in each page image; If there is color information in any page image, stop judging.

[0018] In an embodiment of the present application, when it is determined that color information exists in a page image, the judgment is stopped directly, thereby saving computing power and improving the image processing speed.

[0019] In a possible implementation, the method further includes: If the image forming command includes a special image command, the image forming job is executed according to the image forming command.

[0020] In the embodiments of the present application, when the user selects an image generation scenario that requires high quality, such as "fine printing", the image formation job is directly executed according to the selected image formation mode without switching the image formation mode. Because when the user selects a special image, the special image instruction is an instruction for selecting the image quality. Generally, it is an instruction that requires outputting color black or other special requirements. At this time, not switching the image formation mode can make the image finally presented on the imaging medium more in line with the user's expectations, thereby improving the user experience.

[0021] In a second aspect, an image formation mode switching device provided by an embodiment of the present application includes: An acquisition module, configured to acquire the image formation mode in the image formation instruction, where the image formation mode includes a color mode and a grayscale mode, the color mode is used to generate a color image on the imaging medium, and the grayscale mode is used to generate a grayscale image on the imaging medium; A switching module, configured to switch the image formation mode to the grayscale mode if the image formation mode in the image formation instruction is the color mode and there is no color information in each page of the image.

[0022] In a third aspect, an electronic device provided by an embodiment of the present application is characterized by including: A processor; A memory; And a computer program, where the computer program is stored in the memory, and the computer program includes instructions that, when executed by the processor, cause the electronic device to execute the method described in any one of the first aspects.

[0023] In a fourth aspect, a computer-readable storage medium provided by an embodiment of the present application is characterized in that the computer-readable storage medium includes a stored program, and when the program runs, it controls the device where the computer-readable storage medium is located to execute the method described in any one of the first aspects.

[0024] It can be understood that the image formation mode switching device provided in the second aspect, the electronic device provided in the third aspect, and the computer-readable storage medium provided in the fourth aspect are used to execute the method provided by the present application. Therefore, the beneficial effects that can be achieved can refer to the beneficial effects in the corresponding method, which will not be elaborated here. Description of the Drawings

[0025] To more clearly illustrate the technical solutions of the embodiments of the present application, the accompanying drawings required for the embodiments will be briefly introduced below. Obviously, the accompanying drawings in the following description are only some embodiments of the present application. For those of ordinary skill in the art, without creative efforts, other accompanying drawings can also be obtained based on these drawings.

[0026] Figure 1 Structural schematic diagram of an image forming apparatus provided by an embodiment of the present application; Figure 2 Flow schematic diagram of a method for switching an image forming mode provided by an embodiment of the present application; Figure 3 Flow schematic diagram of another method for switching an image forming mode provided by an embodiment of the present application; Figure 4 Structural schematic diagram of an image forming mode switching device provided by an embodiment of the present application; Figure 5 Flow schematic diagram of another method for switching an image forming mode provided by an embodiment of the present application; Figure 6 Structural schematic diagram of an electronic device provided by an embodiment of the present application. Detailed implementation manners

[0027] To better understand the technical solutions of the present application, the embodiments of the present application will be described in detail below with reference to the accompanying drawings.

[0028] It should be clear that the described embodiments are only some embodiments of the present application, not all of them. All other embodiments obtained by those of ordinary skill in the art based on the embodiments of the present application without creative efforts belong to the scope of protection of the present application.

[0029] The terms used in the embodiments of the present application are only for the purpose of describing specific embodiments and are not intended to limit the present application. The singular forms "a", "the" and "said" used in the embodiments of the present application and the appended claims are also intended to include the plural forms unless the context clearly indicates otherwise.

[0030] It should be understood that the term " / and" used herein is only a description of the association relationship of associated objects, indicating that three relationships can exist. For example, a and / or b can represent: a exists alone, a and b exist simultaneously, and b exists alone. In addition, the character " / " herein generally represents an "or" relationship between the associated objects before and after.

[0031] For ease of understanding, the specific structure and working principle of the image forming apparatus will be exemplarily described below.

[0032] Participate Figure 1 , which is a schematic structural diagram of an image forming apparatus provided for an application example. As Figure 1 shown, the image forming unit of the image forming apparatus may include: a developer accommodating unit 11, a developing member 12, a developer conveying element 13, a photosensitive member 14, a transfer member 15, a fixing assembly 5, etc. The paper to be printed moves in the paper feeding direction and successively undergoes the powder feeding operation of the developer conveying element 13 and the developing operation of the developing member 12, and then reaches the clamping area between the photosensitive member 14 and the transfer member 15 for transfer, and then passes through the fixing assembly 5 for fixing to complete the image forming operation. Among them, the developer accommodating unit 11 is used to accommodate the developer, and the developer may be materials such as toner and carbon powder; the developing member 12 includes: a developing roller, etc.; the developer conveying element 13 includes: a powder feeding roller, etc.; the photosensitive member 14 includes: an organic photo conductor (OPC) drum and a charging roller, etc., where the charging roller is used to charge the photosensitive drum.

[0033] Generally, at least one consumable is detachably installed in the image forming apparatus. Taking the color image forming apparatus shown in Figure 1 as an example, 4 consumables are detachably installed in the image forming apparatus (respectively consumable 1, consumable 2, consumable 3, and consumable 4 shown in Figure 1 ), and the 4 consumables are respectively used to provide developers of four colors, namely black K, cyan C, magenta M, and yellow Y, for the image forming apparatus. Of course, in other embodiments, the number of consumables installed in the image forming apparatus may be increased or decreased, such as 5 or 6 or even more or less, etc. The present application does not limit this.

[0034] In the related art, if the user currently needs to print a black-and-white document, but the user selects the color mode on the driver side, the image forming instruction sent by the driver to the color image forming apparatus will contain color data information. At this time, the black generated on the imaging medium is color black.

[0035] Because the image forming instruction sent by the driver to the color image forming apparatus will contain color data information, and the color data information requires more bytes to mark colors. That is to say, the color data information is redundant in the color mode, which will increase the data transmission volume, resulting in a slow image forming speed, and the color black will cause waste of color consumables, increasing the cost for the user to use the image forming apparatus and affecting the user experience.

[0036] In view of the above problems, the embodiments of the present application provide an image formation mode switching method, apparatus, electronic device, and storage medium. When the image formation mode selected by the user is the color mode, it is determined whether there is color information in each page of the image. If there is no color information in each page of the image, the color mode is switched to the grayscale mode, thereby avoiding printing black-and-white documents using the color mode. In the grayscale mode, there is no color data information in the control instructions sent by the driving side, thereby reducing the transmission of redundant color information, improving the printing speed, and the grayscale mode can avoid the use of color consumables, increasing the service life of the consumables, and further enhancing the user experience. The following will be described in detail with reference to the drawings and specific embodiments.

[0037] See Figure 2 , which is a schematic flowchart of an image formation mode switching method provided by an embodiment of the present application. As Figure 2 shown, it mainly includes the following steps.

[0038] Step S201: Obtain the image formation mode in the image formation instruction.

[0039] Specifically, the image formation mode includes a color mode and a grayscale mode. The color mode is used to generate a color image on the imaging medium, and the grayscale mode is used to generate a grayscale image on the imaging medium.

[0040] Here, taking color printing as an example, the working principles of the terminal device and the color image forming device will be described.

[0041] When the user selects the color mode on the terminal device, the print driver notifies the system background print service (Print Spooler) through the system interface that the current print task requires Enhanced Metafile (EMF) data. The system background print service will cache the print job in the EMF format in the terminal device according to the current settings.

[0042] Among them, the print processor can be set in the terminal device. There may be a processing module in the printer that implements similar functions to the printer processor. The embodiments of the present application do not make specific limitations on this.

[0043] It can be understood that when the image formation mode in the image formation instruction is the color mode, the print driver needs to send an additional color print instruction to the system background print service. If the image is actually a black-and-white image but the user still selects the color mode, this undoubtedly increases the data processing volume.

[0044] However, if the image formation mode in the image formation instruction is the grayscale mode, there is no need to adjust the image formation mode. At this time, the image formation operation can be directly executed according to the image formation instruction. It can be understood that when the image formation mode is the grayscale mode, there is no problem of large data processing volume. Therefore, when the image formation mode is the grayscale mode, there is no need to switch the image formation mode.

[0045] In addition, a special image mode is set in some image forming apparatuses. For example, there is a high-quality image mode. In the high-quality image mode, it is necessary to make the image presented on the imaging medium more in line with the user's expectations. Therefore, in the high-quality image mode, the switching of the image formation mode is not triggered. That is to say, if the image formation instruction includes a high-quality image instruction, the image formation operation is executed according to the image formation instruction, where the high-instruction image instruction is used to trigger the high-quality image mode. It can be understood that when the user selects a high-quality image, it may be necessary to use color black or other special requirements. At this time, without switching the image formation mode, the image finally presented on the imaging medium can be more in line with the user's expectations, thereby improving the user experience.

[0046] Similarly, if the user selects the special image mode as a low-quality image instruction, such as printing tickets for viewing flight and seat numbers only at some airports. Considering energy conservation, even if the color mode is selected on the printer side, it is set to switch to the grayscale mode through the determination of the special image mode instruction.

[0047] Step S202: If the image formation mode in the image formation instruction is the color mode and there is no color information in each page of the image, the image formation mode is switched to the grayscale mode.

[0048] Specifically, as described above, when the image formation mode in the image formation instruction is the color mode, the print driver needs to send an additional color print instruction to the system background print service. If the image is actually a black-and-white image but the user still selects the color mode, this undoubtedly increases the data processing volume. Therefore, in the embodiment of the present application, if the image formation mode in the image formation instruction is the color mode and there is no color information in each page of the image, the image formation mode is switched to the grayscale mode.

[0049] It can be understood that when there is no color information in each page of the image, switching the image formation mode from the color mode to the grayscale mode can avoid the print driver from sending an additional color print instruction to the system background print service, thereby saving the data transmission volume, improving the image formation speed, and enhancing the user experience.

[0050] Taking the example in step S201, in the embodiment of the present application, before the print job is sent to the renderer component (Render Plug-In) of the print driver, the print processor first analyzes the EMF instructions cached by the current print job. If all the print contents do not contain color data, the print driver will process the current print job as a black-and-white print.

[0051] Among them, the print processor dynamic library is a component of the driver program and is registered in the system when the driver is installed. Its main function is to process the print data and transfer the data to the port monitor or the driver program. The renderer dynamic library component is a main component of the driver program. The graphics engine in the system kernel will convert the GDI (Graphics Device Interface) functions called by the application into the DDI (Microsoft Device Driver Interface) functions defined in the renderer component, so as to convert the drawing instructions of the image into image rendering data recognizable by the printer.

[0052] If you want to confirm whether there is color information in each page of the image, you need to judge whether there is color information in each page of the image. Therefore, in the embodiment of the present application, before switching the image formation mode, it is first judged whether there is color information in each page of the image.

[0053] In a possible implementation manner, if the image formation mode in the image formation instruction is the color mode and there is color information in any page of the image, the image formation job is executed according to the image formation instruction. It can be understood that when the image formation mode in the image formation instruction conforms to the actual situation of the image, directly executing the image formation instruction can ensure that the final effect presented on the imaging medium meets the user's expectations, thereby improving the user experience.

[0054] In a possible implementation manner, it is possible to directly judge whether there is color information in the image by judging whether there are color pixel points in each page of the image. Specifically, each page of the image is converted into a bitmap format, and it is judged whether there are color pixel points in each page of the bitmap-format image. If there are color pixel points in any page of the bitmap-format image, it is determined that there is color information in any page of the bitmap-format image; if there are no color pixel points in each page of the bitmap-format image, it is determined that there is no color information in each page of the image.

[0055] In a possible implementation, as described in the example of step S201, the color printing instruction includes EMF data, and the EMF data is also in vector format, occupying less space. Therefore, in the embodiments of the present application, it is possible to determine whether there is color information in the image by determining whether there is color data in the color information of the image formation instruction.

[0056] Specifically, it is determined whether there is color data in the color information of the image formation instruction corresponding to each page of the image. If there is color data in the color information of the image formation instruction corresponding to any page of the image, it is determined that there is color information in any page of the image; if there is no color data in the color information of the image formation instruction corresponding to each page of the image, it is determined that there is no color information in each page of the image. Among them, the color data is the data corresponding to other colors except black and white.

[0057] Exemplarily, the color information may include R, G, B. If the color information includes color data, that is, at least two of the data corresponding to R, G, B are not equal, that is, R≠G or R≠B or G≠B, or R≠G≠B, it means that there is color data in the color information of the image formation instruction. On the contrary, it means that there is no color data in the color information of the image formation instruction.

[0058] It can be understood that since the image formation instruction is enhanced metafile data, this data is convenient for viewing and storing. Directly determining whether there is color data in the color information of the image formation instruction can also improve the processing speed, thereby improving the printing speed and enhancing the user experience.

[0059] In addition, during the process of the image formation mode switching device determining whether there is color information in each page of the image, it determines whether there is color information in each page of the image page by page. If there is color information in any page of the image, the determination is stopped.

[0060] Exemplarily, assuming that the total number of images is 10 pages, the image formation mode switching device will determine whether there is color information in each page of the image page by page. If there is no color information in the first page of the image, it will continue to determine whether there is color information in the second page of the image. If there is no color information in the second page of the image, it will continue to determine whether there is color information in the third page of the image. Similarly, if there is no color information in each page of the image, after all 10 pages of images are determined, it is determined that there is no color information in each page of the image, and thus the image formation mode is switched to the grayscale mode. However, if there is color information in the third page of the image, the determination is stopped and the image formation mode is determined to be the color mode.

[0061] It can be understood that when it is determined that there is color information in a certain page of the image, the determination is directly stopped, thereby saving computing power and improving the image processing speed.

[0062] Corresponding to the above embodiments, an embodiment of the present application further provides another method for switching an image forming mode.

[0063] Refer to Figure 3 , which is a schematic flowchart of another method for switching an image forming mode provided by an embodiment of the present application. As Figure 3 shown, it mainly includes the following steps.

[0064] Step S301: Start.

[0065] Step S302: Determine whether the image forming mode is a color mode.

[0066] Specifically, if so, execute Step S303; if not, execute Step S306.

[0067] Step S303: Analyze the next-page image.

[0068] Specifically, if the current image is the first-page image, analyze the current image. When the analysis of each page of the image is completed and there is no color information in each page of the image, analyze the next-page image.

[0069] Step S304: Determine whether there is color information in the image.

[0070] If so, execute Step S307; if not, execute Step S305.

[0071] Step S305: Determine whether all images have been analyzed.

[0072] If so, execute Step S306; if not, execute Step S303.

[0073] Step S306: Start a black-and-white printing job.

[0074] Step S307: Start a color printing job.

[0075] The specific content involved in the embodiment of the present application can be referred to the description in the above Figure 2 shown embodiment. For the sake of brevity of expression, it will not be elaborated here.

[0076] Corresponding to the above embodiments, the present application further provides an image forming mode switching device.

[0077] Refer to Figure 4 , which is a schematic structural diagram of an image forming mode switching device provided by an embodiment of the present application. As Figure 4As shown in the figure, the image formation mode switching device may include: an acquisition module 401 and a switching module 402. These components communicate through one or more buses. Those skilled in the art can understand that the structure of the electronic device shown in the figure does not constitute a limitation on the embodiments of the present application. It can be a bus structure, a star structure, and may also include more or fewer components than shown in the figure, or combine certain components, or have different component arrangements.

[0078] Among them, the acquisition module 401 is used to acquire the image formation mode in the image formation instruction. The image formation mode includes a color mode and a grayscale mode. The color mode is used to generate a color image on the imaging medium, and the grayscale mode is used to generate a grayscale image on the imaging medium. The switching module 402 is used to switch the image formation mode to the grayscale mode if the image formation mode in the image formation instruction is the color mode and there is no color information in each page of the image.

[0079] As described above, a special portrait mode is set in some image formation devices. In view of this situation, the embodiments of the present application also provide another image formation mode switching method.

[0080] See Figure 5 , which is a schematic flowchart of another image formation mode switching method provided by the embodiments of the present application. As Figure 5 shown, it mainly includes the following steps.

[0081] Step S501: Start.

[0082] Step S502: Determine whether the special portrait mode is a high-quality portrait mode.

[0083] Specifically, if so, do not trigger the switching of the image formation mode, and execute step S508; if not, execute step S503.

[0084] Step S503: Determine whether the image formation mode is the color mode.

[0085] If so, execute step S504; if not, execute step S507.

[0086] Step S504: Analyze the next page of the image.

[0087] Step S505: Determine whether there is color information in the image.

[0088] If so, execute step S508; if not, execute step S506.

[0089] Step S506: Determine whether all images have been analyzed.

[0090] If so, execute step S507; if not, execute step S504.

[0091] Step S507: Start a black-and-white printing job.

[0092] Step S508: Start a color printing job.

[0093] The specific content involved in the embodiments of the present application can be referred to the descriptions in the above Figure 2 and Figure 3 illustrated embodiments. For the sake of brevity of description, it will not be elaborated herein.

[0094] Corresponding to the above embodiments, the present application further provides an electronic device.

[0095] Refer to Figure 6 , which is a schematic structural diagram of an electronic device provided by the embodiments of the present application. As Figure 6 shown, the electronic device 600 may include: a processor 601, a memory 602, and a communication unit 603. These components communicate through one or more buses. Those skilled in the art can understand that the structure of the electronic device shown in the figure does not constitute a limitation on the embodiments of the present application. It can be a bus structure, a star structure, and may also include more or fewer components than shown in the figure, or combine some components, or have different component arrangements.

[0096] Among them, the communication unit 603 is used to establish a communication channel, so that the electronic device can communicate with other devices. Receive user data sent by other devices or send user data to other devices.

[0097] The processor 601 is the control center of the electronic device, connecting various parts of the entire electronic device through various interfaces and lines. By running or executing software programs, instructions, and / or modules stored in the memory 602, and calling data stored in the memory, to execute various functions of the electronic device and / or process data. The processor may be composed of an integrated circuit (IC). For example, it may be composed of a single packaged IC, or may be composed of connecting multiple packaged ICs with the same or different functions. For example, the processor 601 may only include a central processing unit (CPU). In the embodiments of the present application, the CPU may be a single arithmetic core or may include multiple arithmetic cores.

[0098] The memory 602 is used to store the execution instructions of the processor 601. The memory 602 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk or optical disc.

[0099] When the execution instructions in the memory 602 are executed by the processor 601, the electronic device 600 is enabled to execute Figure 2 Some or all of the steps in the illustrated embodiments.

[0100] In a specific implementation, an embodiment of the present application further provides a computer storage medium. The computer storage medium may store a program, and when the program is executed, it may include some or all of the steps in the embodiments of the simulation scenario generation method provided in the embodiments of the present application. The storage medium may be a magnetic disk, an optical disc, a read-only memory (ROM), or a random access memory (RAM), etc.

[0101] In a specific implementation, an embodiment of the present application further provides a computer program product. The computer program product includes executable instructions, and when the executable instructions are executed on a computer, the computer is enabled to execute some or all of the steps in the embodiments of the simulation scenario generation method provided in the embodiments of the present application.

[0102] In the embodiments of the present application, "at least one" means one or more, and "a plurality" means two or more. "And / or" describes the association relationship of associated objects and indicates that three relationships may exist. For example, A and / or B may represent the cases of A existing alone, A and B existing simultaneously, and B existing alone. Where A and B may be singular or plural. The character " / " generally represents an "or" relationship between the associated objects before and after. "At least one of the following" and its similar expressions refer to any combination of these items, including any combination of single items or plural items. For example, at least one of a, b, and c may represent: a, b, c, a - b, a - c, b - c, or a - b - c, where a, b, and c may be single or multiple.

[0103] Those of ordinary skill in the art can realize that the units and algorithm steps described in the embodiments disclosed herein can be implemented by electronic hardware, computer software, or a combination of electronic hardware. Whether these functions are executed in hardware or software depends on the specific application and design constraints of the technical solution. Skilled professionals can use different methods for each specific application to implement the described functions, but such implementation should not be considered to exceed the scope of this application.

[0104] Those skilled in the art can clearly understand that for the convenience and brevity of description, the specific working processes of the systems, devices, and units described above can refer to the corresponding processes in the foregoing method embodiments and will not be elaborated herein.

[0105] In several embodiments provided in this application, if any function is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or a part of this technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions for causing a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this application. The foregoing storage medium includes: various media such as USB flash drives, mobile hard disks, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical discs that can store program codes.

[0106] The same or similar parts among the various embodiments in this specification can be referred to each other. In particular, for the device embodiments and terminal embodiments, since they are basically similar to the method embodiments, the description is relatively simple, and the relevant parts can be referred to the descriptions in the method embodiments.

Claims

1. An image forming mode switching method, characterized in that, Applied to a color image forming apparatus, the method includes: Obtaining an image forming mode in an image forming instruction, where the image forming mode includes a color mode and a grayscale mode, the color mode is used to generate a color image on an imaging medium, and the grayscale mode is used to generate a grayscale image on the imaging medium; If the image forming mode in the image forming instruction is the color mode and there is no color information in each page of the image, then switch the image forming mode to the grayscale mode.

2. The method according to claim 1, wherein After obtaining the image forming mode in the image forming instruction, it further includes: If the image forming mode in the image forming instruction is the grayscale mode, then execute an image forming operation according to the image forming instruction.

3. The method according to claim 1, wherein Before, if the image forming mode in the image forming instruction is the color mode and there is no color information in each page of the image, then switch the image forming mode to the grayscale mode, it further includes: Judging whether there is color information in each page of the image; If the image forming mode in the image forming instruction is the color mode and there is color information in any page of the image, then execute an image forming operation according to the image forming instruction.

4. The method according to claim 3, wherein The judging whether there is color information in each page of the image includes: Converting each page of the image into a bitmap format; Judging whether there are color pixel points in each page of the bitmap-formatted image; If there are color pixel points in any page of the bitmap-formatted image, then determine that there is color information in the any page of the image; If there are no color pixel points in each page of the bitmap-formatted image, then determine that there is no color information in each page of the image.

5. The method according to claim 3, characterized in that The judging whether there is color information in each page of the image includes: Judging whether there is color data in the color information in the image forming instruction corresponding to each page of the image; If there is color data in the color information in the image forming instruction corresponding to any page of the image, then determine that there is color information in the any page of the image; If there is no color data in the color information in the image forming instruction corresponding to each page of the image, then determine that there is no color information in each page of the image.

6. The method according to claim 3, characterized in that The judging whether there is color information in each page of the image includes: Judging whether there is color information in each page of the image page by page; If there is color information in any page of the image, then stop judging.

7. The method according to claim 1, characterized in that The method further includes: If the image forming instruction includes a special portrait instruction, then execute an image forming operation according to the image forming instruction.

8. An image formation mode switching device, characterized in that, It includes: An obtaining module, configured to obtain an image forming mode in an image forming instruction, where the image forming mode includes a color mode and a grayscale mode, the color mode is used to generate a color image on an imaging medium, and the grayscale mode is used to generate a grayscale image on the imaging medium; A switching module, configured to, if the image forming mode in the image forming instruction is the color mode and there is no color information in each page of the image, then switch the image forming mode to the grayscale mode.

9. An electronic device, characterized in that, It includes: A processor; A memory; and a computer program, wherein the computer program is stored in the memory, and the computer program includes instructions that, when executed by the processor, cause the electronic device to perform the method according to any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that, The computer-readable storage medium includes a stored program, wherein, when the program runs, it controls the device where the computer-readable storage medium is located to perform the method according to any one of claims 1 to 7.