Method and device for processing image data and related product

By adopting the design of two operating systems in electronic devices, one operating system can be quickly started for image data acquisition, and the other operating system can recognize and translate text after the acquisition is completed, solving the problem that the device is difficult to achieve timely response and long-term standby at the same time, and achieving energy conservation and improvement of user experience.

CN119946410APending Publication Date: 2025-05-06NETEASE YOUDAO (HANGZHOU) SMART TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510087345.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-01-20
Publication Date
2025-05-06

AI Technical Summary

Technical Problem

While improving timely response capabilities, existing electronic devices are difficult to achieve long-term standby to save energy, resulting in frequent charging of users.

Method used

The design of two operating systems is adopted, one of which is used to quickly start and collect image data, and the other operating system is started after the first operating system has completed the acquisition, for text recognition and text translation.

Benefits of technology

It realizes the timely response of the device to user operations in the shutdown state, and at the same time, it can maintain the shutdown state when there is no need to respond immediately, saving energy.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119946410A_ABST
    Figure CN119946410A_ABST
Patent Text Reader

Abstract

The invention discloses a method and device for processing image data and a related product, equipment comprises a camera, and the method comprises the following steps: responding to a detected startup signal of the equipment, and starting a first operating system in a first processor and a second operating system in a second processor at the same time, the starting speed of the first operating system is higher than that of the second operating system, and after the second operating system is started, the first operating system and the second operating system run at the same time; after the first operating system is started, controlling a camera to collect image data through the first operating system, and storing the image data in a memory; and after the second operating system is started, the second operating system communicates with the first operating system, and the image data is acquired from the memory through the second operating system. According to the method, two operating systems running on different processors are arranged, so that the problem that timely response and long-time standby are difficult to balance in the prior art can be solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure generally relates to the field of energy management technology. More specifically, the present disclosure relates to a device for processing image data. Background Art

[0002] With the development of technology, electronic devices are becoming more and more portable and more powerful. However, at the same time, due to weight and volume restrictions, the batteries of such electronic devices are also severely limited, and due to the enhancement of functions, the power consumption of electronic devices in the working state will inevitably increase significantly. At the same time, such electronic devices are also required to be able to respond to user needs in a timely manner. For example, a dictionary pen needs to be able to scan as soon as the pen is picked up, that is, when the user wants to query a word in a book, the dictionary pen can complete the image acquisition, text recognition and text translation of the word to be translated without the user having to wait for a long time. Electronic devices take a long time to start from shutdown to working state, and the user experience is poor, which requires the dictionary pen to keep working. Taking a 1500mah battery as an example, the current of a traditional dictionary pen in the working state is about 200ma. If it is always in the working state, the battery can only standby for 7.5 hours with a full charge. Here comes the contradiction between timely response and long standby time.

[0003] Common solutions to this contradiction are to increase battery energy density, use hardware with lower power consumption, and improve program algorithms. However, the improvements of these methods are relatively limited and do not fundamentally alleviate this contradiction. In actual applications, users still need to charge frequently.

[0004] In view of this, there is an urgent need to provide a technical solution for managing the status of a device so as to reduce the overall power consumption of the device and achieve timely response to user needs, such as realizing the "pick-up-and-scan" function of a dictionary pen, and ultimately achieving a balance between timely response and long standby time. Summary of the invention

[0005] In order to at least solve one or more of the technical problems mentioned above, the present disclosure proposes a method for processing image data for a device, an apparatus, and a technical solution for related products in multiple aspects.

[0006] In a first aspect, the present disclosure provides a method for processing image data for a device, the device including a camera, the method including: in response to detecting a power-on signal of the device, simultaneously starting a first operating system in a first processor and a second operating system in a second processor, wherein a startup speed of the first operating system is faster than a startup speed of the second operating system, and after the second operating system is started, the first operating system and the second operating system run simultaneously; after the first operating system is started, controlling the camera to collect image data through the first operating system, and saving the image data to a memory; and after the second operating system is started, the second operating system communicates with the first operating system, and obtains the image data from the memory through the second operating system.

[0007] In some embodiments, the device also includes a sensor, wherein, after the first operating system is started, controlling the camera to collect image data through the first operating system includes: after the first operating system is started, initializing the camera through the first operating system; in response to the first operating system detecting the sensing signal of the sensor, controlling the initialized camera to collect image data through the first operating system.

[0008] In some embodiments, after the second operating system is started, the second operating system communicates with the first operating system, and obtaining the image data from the memory through the second operating system includes: after the second operating system is started, initializing the image processing application through the second operating system; the second operating system sends first information to the first operating system, wherein the first information is used to notify the first operating system that the second operating system is ready; and upon receiving second information fed back based on the first information, the second operating system obtains the image data from the memory, wherein the second information is used to notify the second operating system of the functional status and data status of the first operating system.

[0009] In a second aspect, the present disclosure provides an apparatus for processing image data of a device, the device including a camera, and the apparatus including: a startup module, a collection module and an acquisition module; the startup module is configured to, in response to detecting a power-on signal of the device, simultaneously start a first operating system in a first processor and a second operating system in a second processor, wherein a startup speed of the first operating system is faster than a startup speed of the second operating system, and after the second operating system is started, the first operating system and the second operating system run simultaneously; the acquisition module is configured to, after the first operating system is started, control the camera to collect image data through the first operating system, and save the image data to a memory; the acquisition module is configured to, after the second operating system is started, allow the second operating system to communicate with the first operating system, and obtain the image data from the memory through the second operating system.

[0010] In a third aspect, the present disclosure provides an electronic device, comprising: a processor; and a memory, which stores program instructions for the device to process image data, and when the program instructions are executed by the processor, the electronic device executes the method described in any one of the embodiments of the present disclosure.

[0011] In a fourth aspect, the present disclosure provides a computer-readable storage medium storing program instructions for a device to process image data, and when the program instructions are executed by a processor, the method described in any one of the embodiments of the present disclosure is implemented.

[0012] Through the method for processing image data for a device as provided above, the disclosed embodiment uses two operating systems, with the first operating system running on the first processor and the second operating system running on the second processor, thereby realizing the separation of the two functions of collecting image data and text recognition and text translation, so that the former can complete initialization faster, and the latter is also initialized while the former is initialized, thereby reducing the user's waiting time, so that the device can respond to user operations in a timely manner when it is in the off state, and therefore can be kept in the off state at ordinary times to save energy; by saving the image data to the memory through the first operating system and obtaining the image data from the memory by the second operating system, it is possible to realize the reading and writing operations of the image data from two different processors at the same time, thereby improving the data transmission efficiency. BRIEF DESCRIPTION OF THE DRAWINGS

[0013] By reading the detailed description below with reference to the accompanying drawings, the above and other objects, features and advantages of the exemplary embodiments of the present disclosure will become readily understood. In the accompanying drawings, several embodiments of the present disclosure are shown in an exemplary and non-limiting manner, and the same or corresponding reference numerals represent the same or corresponding parts, wherein:

[0014] Figure 1 An exemplary flow chart showing a method for processing image data for a device according to an embodiment of the present disclosure;

[0015] Figure 2 An exemplary flow chart showing a method for controlling a camera to collect image data by a first operating system according to an embodiment of the present disclosure;

[0016] Figure 3 An exemplary flow chart showing a method for a second operating system to communicate and acquire image data according to an embodiment of the present disclosure;

[0017] Figure 4 An exemplary flow chart showing a method for processing image data for a device according to some other embodiments of the present disclosure;

[0018] Figure 5 An exemplary structural block diagram of an apparatus for processing image data in a device according to an embodiment of the present disclosure is shown;

[0019] Figure 6 An exemplary structural block diagram of an electronic device for processing image data according to an execution device of an embodiment of the present disclosure is shown. DETAILED DESCRIPTION

[0020] The following will be combined with the drawings in the embodiments of the present disclosure to clearly and completely describe the technical solutions in the embodiments of the present disclosure. Obviously, the described embodiments are part of the embodiments of the present disclosure, not all of the embodiments. Based on the embodiments in the present disclosure, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present disclosure.

[0021] It should be understood that the terms "include" and "comprising" used in the specification and claims of the present disclosure indicate the presence of described features, integers, steps, operations, elements and / or components, but do not exclude the presence or addition of one or more other features, integers, steps, operations, elements, components and / or collections thereof.

[0022] It should also be understood that the terms used in this disclosure are only for the purpose of describing specific embodiments and are not intended to limit the disclosure. As used in this disclosure and claims, the singular forms of "a", "an", and "the" are intended to include the plural forms unless the context clearly indicates otherwise. It should also be further understood that the term "and / or" used in this disclosure and claims refers to any combination of one or more of the associated listed items and all possible combinations, including these combinations.

[0023] As used in this specification and claims, the term "if" may be interpreted as "when" or "upon" or "in response to determining" or "in response to detecting," depending on the context. Similarly, the phrase "if it is determined" or "if [described condition or event] is detected" may be interpreted as meaning "upon determination" or "in response to determining" or "upon detection of [described condition or event]" or "in response to detecting [described condition or event]," depending on the context.

[0024] The specific implementation of the present disclosure is described in detail below with reference to the accompanying drawings.

[0025] In the present disclosure, by designing the device based on two operating systems, a balance between timely response and long standby time of the device can be achieved.

[0026] The two operating systems of the device, one for writing image data to the memory, hereinafter referred to as the first operating system, and the other for reading image data from the memory, hereinafter referred to as the second operating system, operate a specific storage area of ​​the memory together. The area may include a circular buffer for storing image data, and the circular buffer is used cyclically to save memory resources. The circular buffer may include two pointers, a write pointer and a read pointer. The first operating system can operate the write pointer and write data based on the write pointer; the second operating system can operate the read pointer and read data based on the read pointer. Based on this, the image data written by the first operating system comes from the camera acquisition; and the image data read by the second operating system can be used for subsequent text recognition and text translation.

[0027] The characteristic of this design is that the first operating system starts up faster. Therefore, from shutdown to startup, the user only needs to wait for a short time to start the first operating system, thereby realizing the timely response of the device to the user's operation. After the first operating system is started, the image data can be collected through the camera and saved in the memory. During the collection process, the second operating system continues to start. When the second operating system completes the startup, the image data is read from the memory, and subsequent text recognition and text translation are performed. Since the first operating system and the second operating system are started at the same time, and the second operating system continues to start during the image data collection process, the user has less time to wait for the second operating system to start after the image data is collected, and may not even need to wait.

[0028] For example, the function of collecting image data in the "pick up and scan" function of the dictionary pen. Generally speaking, when a user uses a dictionary pen to take a picture of an image containing text to be translated, the process of taking the image to collect image data should respond in a timely manner, and the subsequent text recognition and text translation functions are expected to take a certain amount of time by the user, so the response time of this part of the function can be appropriately extended.

[0029] For the dictionary pen, when the device is idle for longer than a preset time, it can be directly shut down, thereby minimizing energy consumption. When it is necessary to respond to the user's translation request, the device is turned on, and the first operating system and the second operating system are started at the same time. Since the first operating system starts quickly (about 1 second), the device can also respond to the user's translation request in time. After the first operating system is started, the image data of the book containing the text to be translated is collected. The time for the second operating system to start is about 5 seconds. Since the first operating system and the second operating system are started at the same time, and the second operating system continues to start when the first operating system is collecting image data, after the image data is collected, the user only needs to wait for a short time (generally less than 1 second), or even no time, the second operating system will complete the startup, and then read the image data from the memory, and perform subsequent text recognition and text translation. For the user experience, the time waiting for the first operating system to complete the startup is short, and the user request can be responded to relatively quickly; in addition, the time that the user waits for the second operating system to complete the startup after completing the image data collection is also short. Compared with other solutions, this solution can directly shut down the device after it has been idle for longer than a preset time, thus minimizing energy consumption. Moreover, it can respond to user requests more quickly by directly shutting down and restarting the device. This technical solution solves the problem of the difficulty in balancing timely response and long standby time in the prior art.

[0030] Figure 1 An exemplary flow chart of a method for processing image data for a device according to an embodiment of the present disclosure is shown.

[0031] like Figure 1 As shown, a method for processing image data for a device, the device includes a camera, and the method includes: in response to detecting a power-on signal of the device, simultaneously starting a first operating system in a first processor and a second operating system in a second processor, wherein a startup speed of the first operating system is faster than a startup speed of the second operating system, and after the second operating system is started, the first operating system and the second operating system run simultaneously; after the first operating system is started, controlling the camera to collect image data through the first operating system, and saving the image data to a memory; and after the second operating system is started, the second operating system communicates with the first operating system, and obtains image data from the memory through the second operating system.

[0032] Specifically, the device includes one or more cameras, which can be used to collect image data.

[0033] The method 100 for processing image data for a device according to the embodiment of the present disclosure includes the following steps:

[0034] Step S110, in response to detecting a power-on signal of the device, simultaneously starting a first operating system in the first processor and a second operating system in the second processor.

[0035] The user can trigger the power on through the button of the device. The button can be a button with a single function or a button with multiple functions. The function of the button is determined by the time the button is pressed. For electronic devices, it is preferred to trigger the power on through a button with multiple functions. When the button is pressed for a long time (such as 2 seconds), the EC chip (Embedded Controller) of the device and the port connected to the button will change in high and low levels due to the pressing of the button. When the EC chip determines that the level change reaches the preset value (for example, the low level time caused by pressing the button reaches the threshold of 2 seconds, and it is currently in the off state), the level change caused by pressing the button can trigger the EC chip to start. If the EC chip can work normally, the EC chip can send a power on signal to the chipset of the device and start each power supply circuit.

[0036] The device includes at least two operating systems, namely, a first operating system and a second operating system. At the same time, the device includes at least two processors, namely, a first processor and a second processor. The selection of the first operating system and the second operating system is not limited, and can be a desktop operating system, a mobile terminal operating system, a server operating system, or an embedded operating system. The selection of the first processor and the second processor is not limited, and the architecture of the processor can be x86, ARM, MIPS, Power-PC, and Rsic-V. In this embodiment, the architecture of the processor used is Risc-V and ARM.

[0037] The first operating system can run on the first processor, and the second operating system can run on the second processor. In the design, the first operating system can adopt a lightweight operating system or an operating system with streamlined functions, and the first processor can adopt a chip with faster operating efficiency, while the second operating system can adopt an ordinary operating system, and the second processor can adopt a chip with ordinary operating efficiency. Therefore, the startup speed of the first operating system is faster than the startup speed of the second operating system. Therefore, when the first operating system and the second operating system are started at the same time, if both the first operating system and the second operating system can successfully complete the startup, the first operating system completes the startup before the second operating system.

[0038] When the power-on signal of the device is detected, the device starts to start, and simultaneously starts the first operating system running on the first processor and the second operating system running on the second processor. The first operating system will complete the startup before the second operating system, so that the application running on the first operating system can be initialized before the application running on the second operating system. The application can be a program running on the operating system, such as an image processing application. After completing the initialization, the application can perform a specific task, such as an image processing application can perform an image processing task on image data.

[0039] After the second operating system is started, the first operating system and the second operating system continue to run simultaneously. The two operating systems on the device remain in operation, each running its own functions and communicating with each other. When the user shuts down the device, both operating systems are eventually shut down.

[0040] Step S120, after the first operating system is started, the first operating system controls the camera to collect image data and saves the image data to the memory.

[0041] After the first operating system is started, the camera is controlled by the first operating system to capture an image containing text to be translated to collect image data. For a dictionary pen, an image containing text to be translated can be captured to collect image data. After capturing, the captured image data can be saved in the memory using the data structure of a ring buffer. The ring buffer can improve the utilization of the memory space by recycling the memory space. The ring buffer can include a read pointer and a write pointer, which respectively represent the starting position of the most recently read image data and the starting position of the most recently written image data. The read pointer and the write pointer realize the separation of reading and writing of the image data. When there is only one read pointer and one write pointer, locking of the read operation and the write operation can be avoided, thereby improving the efficiency of the read operation and the write operation.

[0042] Step S130: After the second operating system is started, the second operating system communicates with the first operating system, and the image data is obtained from the memory through the second operating system.

[0043] The startup speed of the first operating system is faster than that of the second operating system. Therefore, after the startup of the second operating system is completed, since the first operating system has also completed startup at this time, the second operating system can communicate with the first operating system, thereby obtaining relevant information of the image data saved to the memory by the first operating system, such as the starting address of the image data and the size of the image data, so that the second operating system can obtain the image data from the memory.

[0044] In addition, by saving the image data to the memory through the first operating system and acquiring the image data from the memory through the second operating system, it is possible to simultaneously perform read and write operations on the image data from two different processors, thereby improving data transmission efficiency.

[0045] Figure 2 An exemplary flow chart of a method for controlling a camera to collect image data by a first operating system according to an embodiment of the present disclosure is shown.

[0046] like Figure 2 As shown, in some embodiments, the device also includes a sensor, wherein after the first operating system is started, controlling the camera to collect image data through the first operating system includes: after the first operating system is started, initializing the camera through the first operating system; in response to the first operating system detecting a sensing signal of the sensor, controlling the initialized camera to collect image data through the first operating system.

[0047] Specifically, the method 200 for the first operating system to control the camera to collect image data in the embodiment of the present disclosure includes the following steps:

[0048] Step S210: after the first operating system is started, the camera is initialized through the first operating system.

[0049] After the first operating system is started, the first operating system can interact with the camera and the pen tip for data. At this time, the camera can be initialized to put the camera in a working state for subsequent image data collection. Initializing the camera includes hardware initialization and software initialization.

[0050] Step S220, in response to the first operating system detecting the sensing signal of the sensor, the first operating system controls the initialized camera to collect image data.

[0051] After the camera is initialized, the first operating system can detect the sensing signal of the sensor. Taking the pen-lifting and scanning function of the dictionary pen as an example, when a word on a book needs to be translated, the user may hold the grip of the dictionary pen, and the pressure sensor of the grip is in a pressed state. At this time, the pressure sensor of the grip generates a sensing signal in a pressed state. Alternatively, the user may bring the pen tip close to the book, and the distance sensor on the pen tip senses a distance less than a threshold, generating a sensing signal reaching a specific distance. Alternatively, the user may click a micro switch, and a sensing signal of the micro switch is generated by pressing the micro switch. Here, the sensor and its sensing signal are not restricted.

[0052] The device responds to the sensing signal, and the first operating system controls the initialized camera to shoot the image, thereby collecting image data. The collected image data will be saved in the memory. The image data can be saved in common image file formats, such as tif format, gif format, jpg format, png format, bayer RAW format, YUYV format, etc. In this embodiment, the format of the image data is bayer RAW format or YUYV format. When shooting images, the camera can have auxiliary shooting functions, such as autofocus function and white balance function, which can improve the clarity of the captured image when collecting images, thereby improving the quality of the collected image data.

[0053] Figure 3 An exemplary flow chart of a method for a second operating system to communicate and acquire image data according to an embodiment of the present disclosure is shown.

[0054] like Figure 3 As shown, in some embodiments, after the second operating system is started, the second operating system communicates with the first operating system, and obtaining image data from the memory through the second operating system includes: after the second operating system is started, initializing the image processing application through the second operating system; the second operating system sends first information to the first operating system; and when receiving second information fed back based on the first information, the second operating system obtains image data from the memory.

[0055] Specifically, the method 300 for the second operating system to communicate and obtain image data in the embodiment of the present disclosure includes the following steps:

[0056] Step S310: after the second operating system is started, the image processing application is initialized through the second operating system.

[0057] After the second operating system is started, the image processing application that can run on the second operating system is initialized, including but not limited to allocating memory space for the image processing application, creating an application context, and reading resources from the disk, so that the image processing application is in a working state.

[0058] Image processing applications can be used to process image data, including text recognition and text translation. Image processing applications can implement their functions as a single application, or they can implement their functions through a batch program that executes multiple applications in a certain order. The batch program can be a bat script or a shell script.

[0059] Step S320: The second operating system sends first information to the first operating system.

[0060] Since the second operating system completes initialization later than the first operating system, the first operating system has completed initialization after the second operating system completes initialization. After both operating systems complete initialization, the second operating system can attempt to establish communication with the first operating system. The second operating system can send a first message to the first operating system, and the first message is used to notify the first operating system that the second operating system is ready and wait for feedback from the first operating system. The first operating system and the second operating system can transmit data through shared memory and mailbox.

[0061] Step S330: upon receiving the second information fed back according to the first information, the second operating system obtains the image data from the memory.

[0062] After the first operating system receives the first information sent by the second operating system, the first operating system will send the second operating system the second information as feedback of the first information, and the second information is used to notify the second operating system of the functional state and data state of the first operating system, wherein the functional state may include that the startup is completed and no image data has been collected, the startup is completed and image data collection is completed, and the startup is completed and image data is being collected. The data state may include no image data, image data, and the amount of image data that can be obtained. Through the above method, the second operating system can obtain the attribute information of the image data to be read, such as whether there is image data in the memory that has not been read by the second operating system. When there is image data in the memory that has not been read by the second operating system, it means that there is at least one image in the memory that has not been processed by the second operating system, and the second operating system can read the image data in subsequent operations. When there is no image data in the memory that has not been read by the second operating system, it means that the image data of all images in the memory have been processed by the second operating system, and the second operating system can keep waiting. Figure 4 An exemplary flow chart of a method for processing image data for a device according to some other embodiments of the present disclosure is shown.

[0063] like Figure 4 As shown, in some embodiments, after the second operating system obtains the image data from the memory, the method also includes: using the image processing application through the second operating system to perform text recognition and text translation on the image data to obtain a translation result; outputting the translation result in a visual or audible manner through the second operating system, and continuing to execute the second operating system to communicate with the first operating system after the output is completed, and obtaining the image data from the memory through the second operating system.

[0064] Specifically, the method 400 for processing image data for a device according to the embodiment of the present disclosure further includes the following steps:

[0065] Step S410: Using an image processing application through the second operating system to perform text recognition and text translation on the image data to obtain a translation result.

[0066] The image processing application running on the second operating system can perform text recognition and text translation on the image data read from the memory.

[0067] The technology of acquiring image data and performing text recognition to convert printed or handwritten text into machine-readable text is generally called optical character recognition (OCR). The core of OCR technology is to extract text from images and convert it into data that can be processed by computers through image processing and pattern recognition technology.

[0068] As for the background technology of the present disclosure, the dictionary pen collects images containing text to be translated through a camera, obtains the text to be translated, and translates the text. Here, the translation may include translation between different languages, such as translation between Chinese and English, translation between Chinese and Japanese, translation between Chinese and Korean, and translation between the same language, such as translation between simplified Chinese and traditional Chinese.

[0069] The text to be translated can be translated through the built-in translation model of the device to obtain the translation result, or it can be uploaded to the server and then the translation result can be obtained from the server. The translation result can be stored in the device in a digital form.

[0070] Step S420: Output the translation result in a visual or audible manner through the second operating system, and continue to execute the second operating system to communicate with the first operating system after the output is completed, and obtain the image data from the memory through the second operating system.

[0071] After the translation result is obtained, it can be output to the user in a visual or audible manner to inform the user of the translation result, such as displaying the text of the translation result on an LED screen or playing the sound of the translation result through a speaker.

[0072] After the output is completed, the second operating system continues to communicate with the first operating system so that the second operating system continues to obtain the image data from the memory. For example, the second operating system sends the first information to the first operating system again, and the first operating system sends the second information to the second operating system again as feedback of the first information, so that the second operating system learns the attribute information of the image data that needs to be read.

[0073] In some embodiments, the power-on signal is generated by a pen switch of the device.

[0074] Specifically, the pen tip of the device is provided with a pen tip switch, for example, a button or a micro switch. The pen tip switch can generate a power-on signal. When the device is in a closed state, by clicking the pen tip switch, a power-on signal is generated, so that the first operating system and the second operating system are started simultaneously.

[0075] Figure 5 An exemplary structural block diagram of an apparatus for processing image data in a device according to an embodiment of the present disclosure is shown.

[0076] like Figure 5 As shown, a device for processing image data of a device, the device includes a camera, and the device includes: a startup module, a collection module and an acquisition module; the startup module is configured to respond to detecting a power-on signal of the device, and simultaneously start a first operating system in a first processor and a second operating system in a second processor, wherein the startup speed of the first operating system is faster than the startup speed of the second operating system, and after the startup of the second operating system is completed, the first operating system and the second operating system run simultaneously; the acquisition module is configured to control the camera to collect image data through the first operating system after the startup of the first operating system is completed, and save the image data to a memory; the acquisition module is configured to communicate with the first operating system after the startup of the second operating system is completed, and acquire image data from the memory through the second operating system.

[0077] Specifically, the device includes one or more cameras, which can be used to collect image data.

[0078] The apparatus 500 for processing image data of a device may include a start module 510, a collection module 520 and an acquisition module 530. The apparatus 500 may be arranged in a device such as a dictionary pen, and is used to process image data of the device.

[0079] The startup module 510 can be used to simultaneously start the first operating system in the first processor and the second operating system in the second processor in response to detecting a power-on signal of the device, wherein the startup speed of the first operating system is faster than the startup speed of the second operating system. After the startup of the second operating system is completed, the first operating system and the second operating system run simultaneously.

[0080] The device includes at least a first operating system and a second operating system, and includes at least a first processor and a second processor. The first operating system can be run on the first processor, and the second operating system can be run on the second processor. In the design, the first operating system can use a lightweight operating system or an operating system with streamlined functions, the first processor can use a chip with faster operating efficiency, and the second operating system can use a common operating system, and the second processor can use a chip with common operating efficiency, so the startup speed of the first operating system is faster than the startup speed of the second operating system.

[0081] When the power-on signal of the device is detected, the device starts to start, and the startup module 510 starts the first operating system running on the first processor and the second operating system running on the second processor at the same time. The first operating system will complete the startup before the second operating system, so that the application running on the first operating system can be initialized before the application running on the second operating system. The application can be a program running on the operating system, such as an image processing application. After completing the initialization, the application can perform a specific task, such as an image processing application can perform an image processing task on image data.

[0082] After the second operating system is started, the first operating system and the second operating system continue to run simultaneously. The two operating systems on the device remain in operation, each running its own functions and communicating with each other. When the user shuts down the device, both operating systems are eventually shut down.

[0083] The acquisition module 520 may be used to control the camera to acquire image data through the first operating system after the first operating system is started, and save the image data to the memory.

[0084] After the first operating system is started, the acquisition module 520 controls the camera to capture images containing the text to be translated through the first operating system to collect image data. For the dictionary pen, an image containing the text to be translated can be captured to collect image data. After shooting, the acquisition module 520 can save the captured image data in the memory using the data structure of the ring buffer.

[0085] The acquisition module 530 may be used to enable the second operating system to communicate with the first operating system after the second operating system is started, and to acquire the image data from the memory through the second operating system.

[0086] The startup speed of the first operating system is faster than that of the second operating system. Therefore, after the second operating system is started, since the first operating system has also completed startup, the second operating system can communicate with the first operating system, so that the acquisition module 530 can obtain relevant information of the image data saved to the memory by the first operating system.

[0087] Figure 6 An exemplary structural block diagram of an electronic device for processing image data according to an execution device of an embodiment of the present disclosure is shown.

[0088] like Figure 6 As shown, an electronic device includes: a processor; and a memory storing program instructions for the device to process image data. When the program instructions are executed by the processor, the electronic device executes any one of the methods according to the embodiments of the present disclosure.

[0089] Specifically, the electronic device 600 can be implemented as various types of devices, including but not limited to mainframes, personal computers (PCs), mobile devices, etc. The electronic device 600 includes a processor 610 and a memory 620. The processor 610 controls the operation of the electronic device 600 by executing program instructions stored in the memory 620. The processor 610 can be implemented using, including but not limited to, a central processing unit (CPU), a graphics processing unit (GPU), an application processor (AP), an artificial intelligence processor chip (IPU), etc. The memory 620 can be used to store various data and instructions processed in the electronic device 600, including a method for processing image data for the device in the embodiment of the present disclosure. The memory 620 may include at least one of a volatile memory or a non-volatile memory. The non-volatile memory may include a read-only memory (ROM), an electrically programmable ROM (EPROM), an electrically erasable programmable ROM (EEPROM), etc. The volatile memory may include a dynamic RAM (DRAM), a static RAM (SRAM), a synchronous DRAM (SDRAM), etc. In addition, the memory 620 may also include at least one of a hard disk drive (HDD), a solid state drive (SSD), a high-density flash memory (CF), a secure digital (SD) card, a micro secure digital (Micro-SD) card, a mini secure digital (Mini-SD) card, an extreme digital (xD) card, a cache, or a memory stick.

[0090] A computer-readable storage medium stores program instructions for processing image data for a device. When the program instructions are executed by a processor, any method according to the embodiments of the present disclosure is implemented.

[0091] Specifically, in order to solve the above technical problems, the present embodiment further provides a readable storage medium, on which program instructions are stored. When the program instructions are executed, the above method for processing image data for a device is executed. Other details of the readable storage medium, such as circuit structure, reading method, working principle, encoding method, etc., can be set by those skilled in the art according to common knowledge, and will not be described in detail here. Since the above readable storage medium stores program instructions capable of executing the above-mentioned method for processing image data for a device, it can also solve the problem of the difficulty in balancing timely response and long standby in the prior art.

[0092] Through the method for processing image data for a device as provided above, the disclosed embodiment uses two operating systems, the first operating system runs on the first processor, and the second operating system runs on the second processor, to achieve the separation of the two functions of collecting image data and text recognition and text translation, so that the former can complete initialization faster, and the latter is also initialized while the former is initialized, reducing the user's waiting time, so that the device can respond to user operations in a timely manner when it is turned off, and can achieve functions such as the "pick up and scan" function of a dictionary pen. Therefore, it can be kept in a closed state at ordinary times to save energy, achieving a balance between timely response and long standby time. By saving the image data to the memory through the first operating system and obtaining the image data from the memory by the second operating system, it is possible to simultaneously read and write image data from two different processors, thereby improving data transmission efficiency.

[0093] Although multiple embodiments of the present disclosure have been shown and described herein, it will be apparent to those skilled in the art that such embodiments are provided by way of example only. Those skilled in the art may think of many changes, modifications, and alternatives without departing from the thought and spirit of the present disclosure. It should be understood that in the process of practicing the present disclosure, various alternatives to the embodiments of the present disclosure described herein may be adopted. The attached claims are intended to define the scope of protection of the present disclosure, and therefore cover equivalents or alternatives within the scope of these claims.

Claims

1. A method for processing image data for a device, the device comprising a camera, the method comprising: In response to detecting a power-on signal of the device, simultaneously starting a first operating system in the first processor and a second operating system in the second processor, wherein a startup speed of the first operating system is faster than a startup speed of the second operating system, and after the second operating system is started, the first operating system and the second operating system run simultaneously; After the first operating system is started, controlling the camera to collect image data through the first operating system, and saving the image data to a memory; and After the second operating system is started, the second operating system communicates with the first operating system, and the image data is obtained from the memory through the second operating system.

2. The method according to claim 1, wherein the device further comprises a sensor, wherein: After the first operating system is started, controlling the camera to collect image data through the first operating system includes: After the first operating system is started, initializing the camera through the first operating system; In response to the first operating system detecting the sensing signal of the sensor, the first operating system controls the initialized camera to collect image data.

3. The method according to claim 1 or 2, wherein: After the second operating system is started, the second operating system communicates with the first operating system, and obtaining the image data from the memory through the second operating system includes: After the second operating system is started, initializing the image processing application through the second operating system; The second operating system sends first information to the first operating system, wherein the first information is used to notify the first operating system that the second operating system is ready; and Upon receiving second information fed back according to the first information, the second operating system obtains the image data from the memory, wherein the second information is used to notify the second operating system of the functional status and data status of the first operating system.

4. The method according to claim 3, after the second operating system obtains the image data from the memory, the method further comprises: Using the image processing application to perform text recognition and text translation on the image data through the second operating system to obtain a translation result; The translation result is outputted in a visual or audible manner through the second operating system, and after the output is completed, the second operating system continues to communicate with the first operating system, and the image data is obtained from the memory through the second operating system.

5. The method according to claim 1, wherein: The power-on signal is generated by a pen switch of the device.

6. A device for processing image data of a device, the device comprising a camera, the device comprising: Startup module, collection module and acquisition module; The startup module is configured to start a first operating system in the first processor and a second operating system in the second processor simultaneously in response to detecting a power-on signal of the device, wherein a startup speed of the first operating system is faster than a startup speed of the second operating system, and after the startup of the second operating system is completed, the first operating system and the second operating system run simultaneously; The acquisition module is configured to control the camera to acquire image data through the first operating system after the first operating system is started, and save the image data to the memory; The acquisition module is configured to enable the second operating system to communicate with the first operating system after the second operating system is started, and to acquire the image data from the memory through the second operating system.

7. An electronic device comprising: processor; and a memory storing program instructions for the device to process image data, wherein when the program instructions are executed by the processor, the electronic device executes the method according to any one of claims 1 to 5.

8. A computer-readable storage medium storing program instructions for a device to process image data, wherein when the program instructions are executed by a processor, the method according to any one of claims 1 to 5 is implemented.