Data processing method, device, electronic device and readable medium
By collecting data in real-time at edge nodes and distributing processing tasks, and utilizing the capabilities and distance information of computing units for distribution, the problem of equipment updates and limited resources in the existing technology is solved, and efficient, real-time data processing and scene adaptability are achieved.
Patent Information
- Application Number
- CN201910093584.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2019-01-30
- Publication Date
- 2024-09-24
- Estimated Expiration
- 2039-01-30
AI Technical Summary
It is difficult with existing technology to implement efficient and real-time data processing of artificial intelligence algorithms at edge nodes without updating equipment, especially in scenarios with limited resources and unstable network conditions, and the cost of existing artificial intelligence hardware equipment is high , single function, and not suitable for complex business needs.
By collecting data in real time and inputting it into the computing model, it is split into multiple computing tasks, distributed and processed according to the capabilities and distance information of the computing unit, and a backup unit is used when distribution fails to achieve integration of computing results and further operation of the equipment. .
It realizes the real-time completion of various data processing tasks without updating the equipment, improves scene adaptability and computing efficiency, and is suitable for complex business needs.
Smart Images

Figure 00000000_0000
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of data processing technology, and in particular to a data processing method, device, electronic device and computer-readable medium. Background Art
[0002] In recent years, artificial intelligence algorithms have developed rapidly, and deep learning neural networks have made major breakthroughs in various applications in the field of computer vision, such as image classification, target detection, and image segmentation. As the accuracy of the algorithm improves, the depth of the neural network continues to increase, the model structure continues to become more complex, and its calculation process requires a lot of computing resources. At the same time, when applying artificial intelligence to existing security, entertainment, advertising, medical, education and other fields, its terminal computing devices usually have infrastructure such as cameras and display screens. In order to add artificial intelligence analysis functions to the above scenarios without wanting to update their native devices, it is a key research and development direction to terminal artificial intelligence and deploy it at low cost on edge nodes with high real-time performance, large data throughput, and unguaranteed network conditions.
[0003] In response to the above problems, the academic community has proposed lightweight neural networks, model compression and other methods. Although such solutions provide solutions in model structure design, compression storage, and rate optimization, their performance, such as real-time, versatility, and portability, cannot meet the real edge deployment needs.
[0004] In addition, in order to realize the terminalization of artificial intelligence, artificial intelligence cameras, artificial intelligence hardware devices and artificial intelligence chips have been launched. However, artificial intelligence chips require the overall update and replacement of front-end equipment, resulting in a waste of resources; at the same time, the camera is highly customized, with single functions and limited intelligent analysis that can be run. Artificial intelligence hardware devices are large in size, high in cost, and highly related to the company's development kit. They are not suitable for a large number of front-end equipment upgrades and complex and diverse business needs. At the same time, artificial intelligence chips are mainly used in specific fields, such as intelligent driving, and it is basically not feasible to develop related applications for them.
[0005] Therefore, a new data processing method, device, electronic device and computer-readable medium are needed.
[0006] The above information disclosed in this Background section is only for enhancement of understanding of the background of the present disclosure and therefore it may contain information that does not constitute the prior art that is already known to one of ordinary skill in the art. Summary of the invention
[0007] In view of this, the present disclosure provides a data processing method, device, electronic device and computer-readable medium, which can complete various data processing tasks in real time without updating equipment, thereby improving scene adaptability and computing efficiency.
[0008] Other features and advantages of the present disclosure will become apparent from the following detailed description, or may be learned in part by the practice of the present disclosure.
[0009] According to a first aspect of an embodiment of the present disclosure, a data processing method is proposed, which is applied to a vending device, comprising: collecting data related to the vending device in real time as data to be processed; inputting the data to be processed into at least one computing model, and splitting the data into multiple computing tasks based on the at least one computing model; distributing the multiple computing tasks to multiple computing units for computing according to a predetermined rule; integrating the computing results of the multiple computing tasks to generate a processing result of the data to be processed; and further operating the vending device based on the processing result.
[0010] In an exemplary embodiment of the present disclosure, it further includes: when the distribution of the plurality of computing tasks fails according to a predetermined rule, distributing the computing tasks to a backup computing unit for computing.
[0011] In an exemplary embodiment of the present disclosure, it also includes: acquiring at least one first operation model from the server; and performing format conversion on the at least one first operation model to generate the at least one operation model.
[0012] In an exemplary embodiment of the present disclosure, the operation model includes: model version information, operator information, and model graph information.
[0013] In an exemplary embodiment of the present disclosure, distributing the multiple computing tasks to multiple computing units for computing according to a predetermined rule includes: acquiring the computing capability of each computing unit and / or the distance information of the vending device; and distributing at least one computing task that can be computed to each computing unit according to the computing capability and / or the distance information.
[0014] In an exemplary embodiment of the present disclosure, distributing the multiple computing tasks to multiple computing units for computing according to predetermined rules includes: obtaining multiple interface information of the multiple computing units; and calling the multiple computing units according to the multiple interface information to distribute the multiple computing tasks to the multiple computing units for computing.
[0015] In an exemplary embodiment of the present disclosure, collecting data related to the vending device in real time as data to be processed includes: collecting data emitted by sensors of the vending device in real time, wherein the sensors include: camera equipment, infrared sensors, distance sensors, and ultrasonic sensors.
[0016] In an exemplary embodiment of the present disclosure, acquiring the data to be processed includes: acquiring image data obtained by a camera installed on the vending device; and preprocessing the image data to generate the data to be processed.
[0017] In an exemplary embodiment of the present disclosure, the plurality of computing units are dispersedly located on the vending device.
[0018] According to a second aspect of an embodiment of the present disclosure, a data processing device is proposed, which includes: a data acquisition module, used to collect data related to the vending device in real time as data to be processed; a task splitting module, used to input the data to be processed into a calculation model, and split the calculation model into multiple calculation tasks; a task distribution module, used to distribute the multiple calculation tasks to multiple calculation units for calculation according to predetermined rules; a data processing module, used to integrate the calculation results of the multiple calculation tasks to generate a processing result of the data to be processed; and other operation modules, used to further operate the vending device based on the processing result.
[0019] In an exemplary embodiment of the present disclosure, it further includes: a task distribution backup module, which is used to distribute the computing tasks to the backup computing units for computing when the distribution of the multiple computing tasks fails according to a predetermined rule.
[0020] According to the third aspect of an embodiment of the present disclosure, an electronic device is proposed, which includes: one or more processors; a storage device for storing one or more programs; when the one or more programs are executed by the one or more processors, the one or more processors implement any of the data processing methods described above.
[0021] According to a fourth aspect of an embodiment of the present disclosure, a computer-readable medium is provided, on which a computer program is stored, wherein the program implements the data processing method as described in any one of the above items when executed by a processor.
[0022] According to the data processing method, device, electronic device and computer-readable medium disclosed in the present invention, various data processing tasks can be completed in real time without updating equipment, thereby improving scene adaptability and computing efficiency.
[0023] It is to be understood that the foregoing general description and the following detailed description are exemplary only and are not restrictive of the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS
[0024] The drawings herein are incorporated into the specification and constitute a part of the specification, illustrate embodiments consistent with the present disclosure, and together with the specification are used to explain the principles of the present disclosure. The drawings described below are only some embodiments of the present disclosure, and for ordinary technicians in this field, other drawings can also be obtained based on these drawings without creative work.
[0025] Figure 1 The present invention is a system block diagram showing a data processing method and device according to an exemplary embodiment.
[0026] Figure 2 The invention is a flowchart of a data processing method according to an exemplary embodiment.
[0027] Figure 3 is a flowchart of a data processing method according to another exemplary embodiment.
[0028] Figure 4 It is a block diagram of a data processing device according to an exemplary embodiment.
[0029] Figure 5 is a block diagram of a data processing device according to another exemplary embodiment.
[0030] Figure 6 is a software architecture diagram of a data processing device according to another exemplary embodiment.
[0031] Figure 7 is a software architecture diagram of a data processing device according to another exemplary embodiment.
[0032] Figure 8 It is a block diagram of an electronic device according to an exemplary embodiment.
[0033] Fig. 9 The present invention is a schematic diagram showing a computer-readable storage medium according to an exemplary embodiment. DETAILED DESCRIPTION
[0034] Example embodiments will now be described more fully with reference to the accompanying drawings. However, example embodiments can be implemented in many forms and should not be construed as limited to the embodiments set forth herein; rather, these embodiments are provided so that the present invention will be comprehensive and complete and fully convey the concepts of the example embodiments to those skilled in the art. The same reference numerals in the figures represent the same or similar parts, and thus their repeated description will be omitted.
[0035] The described features, structures or characteristics may be combined in one or more embodiments in any suitable manner. In the following description, many specific details are provided to provide a full understanding of the embodiments of the present invention. However, those skilled in the art will appreciate that the technical solution of the present invention may be practiced while omitting one or more of the specific details, or other methods, components, devices, steps, etc. may be adopted. In other cases, known methods, devices, implementations or operations are not shown or described in detail to avoid blurring various aspects of the present invention.
[0036] The accompanying drawings are only schematic illustrations of the present invention, and the same reference numerals in the drawings represent the same or similar parts, so their repeated description will be omitted. Some block diagrams shown in the accompanying drawings do not necessarily correspond to physically or logically independent entities. These functional entities can be implemented in software form, or in one or more hardware modules or integrated circuits, or in different networks and / or processor devices and / or microcontroller devices.
[0037] The flowcharts shown in the accompanying drawings are only exemplary and do not necessarily include all the contents and steps, nor must they be executed in the order described. For example, some steps can be decomposed, and some steps can be combined or partially combined, so the actual execution order may change according to actual conditions.
[0038] Exemplary embodiments of the present invention will be described in detail below with reference to the accompanying drawings.
[0039] Figure 1 The present invention is a system block diagram showing a data processing method and device according to an exemplary embodiment.
[0040] The server 105 may be a server that provides various services, such as a background management server (only an example) that provides support for the data processing system operated by the user using the terminal devices 101, 102, and 103. The background management server may analyze and process the received data such as the data processing request, and feed back the processing results (such as the calculation results of multiple calculation units - only an example) to the terminal device.
[0041] The server 105 may, for example, obtain data to be processed, wherein the data to be processed is data detected in real time by sensors in the vending device; the server 105 may, for example, input the data to be processed into at least one computing model, and split the data into multiple computing tasks based on the at least one computing model; the server 105 may, for example, distribute the multiple computing tasks to multiple computing units for computing according to a predetermined rule. The server 105 may, for example, integrate the computing results of the multiple computing tasks to generate a processing result of the data to be processed. The server 105 may, for example, perform further operations on the vending device based on the processing result.
[0042] The server 105 may be a physical server, or may be composed of a plurality of servers, a portion of the server 105 may be used as a data processing task submission system in the present disclosure, for obtaining tasks to execute data processing commands; and a portion of the server 105 may be used as a data processing system in the present disclosure, for obtaining data to be processed; inputting the data to be processed into at least one computing model, and splitting the data into a plurality of computing tasks based on the at least one computing model; distributing the plurality of computing tasks to a plurality of computing units for computing according to a predetermined rule; and integrating the computing results of the plurality of computing tasks to generate a processing result of the data to be processed; and further operating the vending device based on the processing result.
[0043] It should be noted that the data processing method provided in the embodiment of the present disclosure can be executed by the server 105, and accordingly, the data processing device can be set in the server 105. The request end provided to the user for submitting data processing tasks and obtaining data processing results is generally located in the terminal devices 101, 102, and 103.
[0044] According to the data processing method and device disclosed in the present invention, various data processing tasks can be completed in real time without updating equipment, thereby improving scene adaptability and computing efficiency.
[0045] Figure 2 2 is a flow chart showing a data processing method according to an exemplary embodiment. The data processing method 20 at least includes steps S202 to S208.
[0046] like Figure 2As shown, in S202, data related to the vending device is collected in real time as data to be processed. Among them, the data to be processed may be the input data of the artificial intelligence algorithm, or the input data of the computing model in other scenarios with large computing volume and high real-time requirements, and the present disclosure does not make special limitations on this. In the process of terminalizing artificial intelligence, the data to be processed can be directly obtained through the existing input device at the front end. For example, when the method of this embodiment is applied to a vending device, the data to be processed is the data detected in real time by the sensor in the vending device. A vending device refers to a type of device with a vending function, such as but not limited to a vending cabinet, a vending shelf, an unmanned vending cabinet, an unmanned vending shelf, an unmanned refrigerator, etc.
[0047] In one embodiment, real-time collection of data related to the vending device as data to be processed includes: real-time collection of data emitted by sensors of the vending device, wherein the sensors include: camera equipment, infrared sensors, distance sensors, and ultrasonic sensors. For example, when a user uses the vending device, the vending device obtains user data, such as image data, distance data, etc., through the camera equipment, infrared sensors, distance sensors, and ultrasonic sensors equipped therewith, and records user photo information and distance information between the user and the vending device, respectively. The image data and the distance data are integrated to generate data to be processed for processing.
[0048] In one embodiment, image data obtained by a camera installed on a vending device is obtained; and the image data is preprocessed to generate data to be processed. The data information collected by the camera may be in video or image format. For video data, image data is obtained by extracting multiple frames. In the image data, there may be interference information in each image. The image preprocessing method can be used to eliminate irrelevant information in the image, restore useful real information, enhance the detectability of relevant information, and simplify the data to the maximum extent. Image preprocessing data usually includes grayscale, geometric transformation, image enhancement and other steps.
[0049] In S204, the data to be processed is input into at least one computing model, and is split into multiple computing tasks based on at least one computing model. Among them, the method of this embodiment can be applied to a front-end edge device. The front-end edge device is a device or equipment with computing capabilities when applied to a specific scenario. For example, the front-end edge device in the vending device integrates multiple interfaces, computing units and memories, which can be connected to sensors and output devices in the vending device. The front-end edge device can be used to receive the data to be processed in the sensor and implement the method of this embodiment on the device to be processed. When the method of this embodiment is applied to the front-end edge device, the front-end edge device may need to perform multiple model operations. For example, in the scenario of the vending device, it is necessary to perform multiple operations such as face detection, face attribute judgment, and face recognition on the extracted user image. In this case, the computing models include: face detection model, face attribute judgment model, face recognition model, etc. Multiple computing models can be performed simultaneously, or they can be performed sequentially based on the computing results of another model. For example, the detection results of the face detection model can be respectively input into the face attribute judgment model and the face recognition model to perform operations separately. In addition, each computing model may include multiple computing tasks. For example, a deep learning neural network model may include convolution computing tasks, pooling computing tasks, etc.
[0050] In one embodiment, it also includes: obtaining at least one first computing model from the server; converting the format of at least one first computing model to generate at least one computing model. The training process of the computing model is usually performed on a graphics processor GPU and an embedded neural network processor NPU, and the model framework and data outputted are only used for computing on the server. Among them, the NPU adopts the architecture of "data-driven parallel computing" and is particularly good at processing massive multimedia data such as videos and images. In order to realize the computing model in the existing equipment at the front end, this embodiment defines the storage format of the front-end computing model.
[0051] In one embodiment, the computational model includes: model version information, operator information, and model graph information. The model version information is the version number and a brief description of the corresponding model; the operator information includes all operators included in the corresponding model, such as convolution operation conv2d, pooling operation maxpooling, etc.; the model graph information is composed of nodes, and each node includes information such as data type, input, output, whether quantized, data dimension, and specific value.
[0052] In S206, multiple computing tasks are distributed to multiple computing units for computing according to a predetermined rule. By splitting each computing model into multiple computing tasks, they can be input into different computing units for computing. Different computing units can be multiple devices with computing processing capabilities already in the front-end device, such as but not limited to digital signal processors DSP, graphics processors GPU, etc. By distributing multiple computing tasks to multiple existing devices for heterogeneous parallel computing, multiple data processing tasks can be completed in real time without updating the equipment.
[0053] In one embodiment, the computing power of each computing unit and / or the distance information of the vending device are obtained; and at least one computing task that can be operated is distributed to each computing unit according to the computing power and / or distance information. Among them, the computing power of each computing unit in the existing front-end equipment is different, and computing tasks within the range of its computing power are distributed to it according to its computing power, so as to achieve reasonable distribution. In addition, the distance information between each computing unit and the vending device refers to the physical distance between the computing unit and the vending device, and can also be the communication distance between the computing unit and the vending device, which is not specifically limited in the present disclosure. An example of distribution based on distance information is as follows: when distributing a certain computing task, two computing units with the same computing power are confirmed. In this case, the one of the two computing units with a closer distance is selected to receive the current computing task. However, the embodiments of the present disclosure can also be distributed according to computing power and distance information at the same time, and the priority of the two is not specifically limited.
[0054] In one embodiment, multiple interface information of multiple computing units is obtained; and multiple computing units are called according to the multiple interface information to distribute multiple computing tasks to the multiple computing units for computing. Each computing unit has an adaptation interface. The adaptation interface is to transform the interface of a class into another interface expected by the client, so that two classes that originally could not work together due to interface mismatch can work together. The adaptation interface can eliminate the defect that each device in the existing front-end devices cannot work together due to incompatibility with the front-end.
[0055] Each piece of interface information may include the computing capability of its corresponding computing unit, so that the computing capability of each computing unit can be obtained while acquiring the interface information, so as to distribute computing tasks according to the computing capabilities.
[0056] In one embodiment, when the distribution of multiple computing tasks fails according to a predetermined rule, the computing tasks are distributed to a backup computing unit for computing. The distribution of computing tasks can be performed in the central processing unit. If there is no suitable computing unit for a computing task to be computed during the distribution process, the central processing unit can be used as a backup computing unit and directly distributed to the central processing unit for computing, or other types of backup computing units can be selected to complete the computing task.
[0057] In one embodiment, multiple computing units are dispersedly located on the vending device. Among them, multiple computing units such as digital signal processors, graphics processors, etc. are located on the vending device, and the computing units can also be existing devices in the vending device, such as existing processing units in electronic price tags, artificial intelligence cameras, etc. Further, when there are multiple vending devices, for example, when two vending devices are placed together at the same time and can communicate with each other, after the first vending device detects the data to be processed and generates multiple computing tasks, all computing units in the two vending devices can be queried at the same time to allocate computing tasks.
[0058] In S208, the operation results of multiple operation tasks are integrated to generate the processing result of the data to be processed. The operation result of a certain operation task may be the input value of another operation task; or the operation structure of multiple operation tasks constitutes the output result of the current operation model, thereby completing the operation of the data to be processed and outputting the result.
[0059] In S210, the vending device is further operated based on the processing result. For example, when the operation model is a face attribute judgment model, the processing result is a user attribute value, such as gender, age, etc. Different types of advertisements are selected for display according to face attributes for personalized display of advertisements, which can improve user experience.
[0060] According to the data processing method disclosed in the present invention, by allocating adapter interfaces to the existing computing units in the front-end device and distributing the computing tasks split in the computing model, the computing results are finally integrated to realize data processing. This allows various data processing tasks to be completed in real time without updating the equipment, thereby improving scene adaptability and computing efficiency.
[0061] It should be clearly understood that the present disclosure describes how to form and use specific examples, but the principles of the present disclosure are not limited to any details of these examples. On the contrary, based on the teachings of the contents disclosed in the present disclosure, these principles can be applied to many other embodiments.
[0062] Figure 3 is a flow chart of a data processing method according to another exemplary embodiment. The data processing method 30 at least includes steps S302 to S306. The data processing method 30 describes the flow of the data processing method when it is applied to the advertising screen business.
[0063] When dealing with the upgrade scenario of traditional advertising screen business in large supermarkets, in order to realize the intelligent display of advertising screens, pedestrian detection models, face detection models, face attribute judgment models, face recognition models, etc. can be equipped for them. Under normal conditions, the pedestrian detection module runs in real time; when pedestrians are detected within the predetermined range, the corresponding video screen or advertisements without specific attributes can be controlled to play; at the same time, after pedestrians are detected, the operation of the pedestrian detection model is turned off and the face detection and face attribute judgment models are turned on, and corresponding advertisements and discount promotions are pushed according to the attributes of the customers in front of the advertising screen.
[0064] like Figure 3 As shown, in S302, user data is collected and acquired through a camera and an infrared sensor.
[0065] In S304, whether there are pedestrians within the predetermined range of the advertising screen is detected through the operation of the pedestrian detection model.
[0066] In S306, when a pedestrian is detected, the operation of the pedestrian detection model is turned off, and the operation of the face detection and face attribute judgment model is turned on. Figure 2 In the illustrated embodiment, no further details are given here.
[0067] In S308, different advertising information is sent to the advertising screen according to the calculation results of the face detection and face attribute judgment model. For example, when a woman is leading a baby in front of the advertising screen, diapers, milk powder and other products can be pushed; if an elderly person is in front of the advertising screen, health care products can be recommended. The face recognition model can filter out duplicate pedestrians, and the same advertisement will not be pushed to the same pedestrian, causing user resistance. This new marketing model can interact with customers in a friendly and non-invasive manner, and better achieve marketing goals.
[0068] According to the data processing method disclosed in the present invention, the data to be processed is obtained through sensors such as the camera of the advertising screen, and the model operation is split into the existing operation unit of the advertising screen, which can realize the intelligent display function of the advertising content without updating the device.
[0069] Those skilled in the art will appreciate that all or part of the steps for implementing the above embodiments are implemented as a computer program executed by a CPU. When the computer program is executed by the CPU, the above functions defined by the above method provided by the present disclosure are performed. The program may be stored in a computer-readable storage medium, which may be a read-only memory, a disk, or an optical disk, etc.
[0070] In addition, it should be noted that the above figures are only schematic illustrations of the processes included in the method according to the exemplary embodiments of the present disclosure, and are not intended to be limiting. It is easy to understand that the processes shown in the above figures do not indicate or limit the time sequence of these processes. In addition, it is also easy to understand that these processes can be performed synchronously or asynchronously, for example, in multiple modules.
[0071] The following are embodiments of the device disclosed herein, which can be used to execute the method embodiments disclosed herein. For details not disclosed in the device embodiments disclosed herein, please refer to the method embodiments disclosed herein.
[0072] Figure 4 is a block diagram of a data processing device according to an exemplary embodiment. Figure 4 The data processing device 40 at least includes: a data acquisition module 402, a task splitting module 404, a task distribution module 406, a data processing module 408 and other operation modules 410.
[0073] In the data processing device, the data acquisition module 402 is used to acquire the data to be processed. The data to be processed may be the input data of the artificial intelligence algorithm, or the input data of the computing model in other scenarios with large computing volume and high real-time requirements, and the present disclosure does not specifically limit this. In the process of terminalizing artificial intelligence, the data to be processed can be directly acquired through the existing input device at the front end. For example, when the device of this embodiment is applied to a vending device, the data to be processed is the data detected in real time by the sensor in the vending device.
[0074] In one embodiment, the data acquisition module 402 is used to collect data sent by sensors of the vending device in real time, wherein the sensors include: camera equipment, infrared sensors, distance sensors, and ultrasonic sensors.
[0075] In one embodiment, the data acquisition module 402 is used to acquire image data obtained by a camera installed on the vending device; and pre-process the image data to generate data to be processed.
[0076] The task splitting module 404 is used to input the data to be processed into the computing model and split the computing model into multiple computing tasks. When the method of this embodiment is applied to a front-end edge device, the front-end edge device may need to perform multiple model operations.
[0077] In one embodiment, the task splitting module 404 is further used to obtain at least one first computing model from the server; and perform format conversion on the at least one first computing model to generate at least one computing model.
[0078] In one embodiment, the computational model includes: model version information, operator information, and model graph information.
[0079] The task distribution module 406 is used to distribute multiple computing tasks to multiple computing units for computing according to a predetermined rule. By splitting each computing model into multiple computing tasks, they can be input into different computing units for computing. The different computing units can be multiple devices with computing processing capabilities already in the front-end device, such as but not limited to digital signal processors DSP, graphics processors GPU, etc. By distributing multiple computing tasks to multiple existing devices for heterogeneous parallel computing, multiple data processing tasks can be completed in real time without updating the equipment.
[0080] In one embodiment, the task distribution module 406 is used to obtain the computing capability of each computing unit and / or the distance information of the vending device; and distribute at least one computing task to each computing unit according to the computing capability and / or the distance information.
[0081] In one embodiment, the task distribution module 406 is used to obtain multiple interface information of multiple computing units; and call multiple computing units according to the multiple interface information to distribute multiple computing tasks to the multiple computing units for computing.
[0082] In one embodiment, the plurality of computing units are dispersedly located on the vending device.
[0083] The data processing module 408 is used to integrate the operation results of the multiple operation units to generate the processing results of the data to be processed. The operation result of a certain operation task may be the input value of another operation task; or the operation structure of multiple operation tasks constitutes the output result of the current operation model, thereby completing the operation of the data to be processed and outputting the result.
[0084] The remaining operation modules 410 are used to further operate the vending device based on the processing results. For example, when the operation model is a face attribute judgment model, the processing result is a user attribute value, such as gender, age, etc. Different types of advertisements are selected for display according to face attributes, which is used for personalized display of advertisements, and can improve user experience.
[0085] In one embodiment, it further includes: a task distribution backup module, which is used to distribute the computing tasks to the backup computing units for computing when the distribution of the multiple computing tasks fails according to the predetermined rules.
[0086] According to the data processing device disclosed in the present invention, by allocating adapter interfaces to the existing computing units in the front-end device and distributing the computing tasks split in the computing model, the computing results are finally integrated to realize data processing. It can complete various data processing tasks in real time without updating the equipment, thereby improving the scene adaptability and computing efficiency.
[0087] Figure 5 It is a block diagram of a data processing device according to another exemplary embodiment. It can perform real-time analysis and parallel computing. The device can simply transform and upgrade the existing front-end equipment in the security, entertainment, advertising, medical, education and other industries. According to the needs of business scenarios, it adapts to a variety of input / output interfaces, so that the edge device has the function of intelligent analysis (such as face detection, pedestrian statistics, behavior recognition, etc.), and displays the analysis results at the output end, or reports to the back-end management system for the next step of analysis and storage. The intelligent analysis module itself does not have the acquisition / display function. Through a variety of rich and tailorable input / output interfaces, it is coupled with existing equipment and cooperates together to provide intelligent analysis and computing functions.
[0088] The computing unit part in this embodiment can adopt a variety of combinations. For example, the CPU part can select ARM Cortext-A, Cortex-M, Cortext-R, ARM11 and other series according to the computing power requirements, and can use OpenMP to achieve multi-core parallel acceleration computing. The GPU part can integrate the current common GPU series on mobile terminals, such as Mali-T860, Mali-T764, Adreno330, Adreno350, etc. At present, these chips all support OpenCL for graphics acceleration computing. The intelligent analysis module supports the simultaneous operation of multiple models of different tasks.
[0089] The input / output interface can be customized for specific business scenarios. The intelligent analysis device adopts an embedded design, small size, low power consumption, and convenient terminal deployment, and is used for equipment upgrades and renovations.
[0090] Figure 6 This is a software architecture diagram of a data processing device according to another exemplary embodiment. Currently, ARM chips support small embedded systems such as Android and Linux, on which business logic processing can be performed, deep learning models / data can be loaded, and analysis results can be displayed or reported with the help of system frameworks (android UI or Linux Qt framework). Figure 6 As shown in the software architecture diagram, the application layer code is separated from the underlying acceleration driver, and with the help of the intermediate neural network unified adaptation layer, one set of code, multi-terminal deployment, and adaptive acceleration computing functions are achieved.
[0091] like Figure 6 As shown, the software architecture is mainly divided into three layers:
[0092] (1) Application layer: mainly responsible for business logic processing, result display, etc., such as page push on billboards and game interface on interactive large screens. At the same time, deep neural networks are stored in a data format suitable for terminal device parsing / running through a certain model conversion method. The application layer calls the parser of the mobile neural network model, loads the model file, creates a forward reasoning graph, extracts the input nodes and output nodes of the model, sends the preprocessed images to the input nodes in sequence, and extracts the analysis results of the output nodes in sequence for analysis / reporting.
[0093] (2) Neural network operation adaptation layer: This layer provides a unified Adapter API for the application layer to call, and encapsulates / develops a set of unified hardware acceleration APIs. Different chips can implement specific API acceleration mechanisms within their own frameworks. When the unified hardware acceleration layer detects that there is no acceleration support, it can also seamlessly switch to the CPU to execute the forward reasoning of the entire model. At the same time, the model structure supports some operations to be performed on the CPU and some operations to be run on the GPU / DSP / ASIC. In this way, forward reasoning can be well supported for a wide range of deep neural network frameworks.
[0094] (3) Chip driver layer: The chip driver layer implements its own acceleration according to the interface definition of the unified acceleration API and the internal mechanism of the chip.
[0095] The software architecture layer also includes a model conversion layer, whose structure can be seen in Figure 7 Most deep neural network training is performed on GPU / NPU / TPU, and the output model framework and data are only applicable to the server. This intelligent analysis module defines the model mobile storage format. The model file contains the following parts:
[0096] (1) Version number and description: A brief description of the model and its version number.
[0097] (2) All operators included in the model, such as conv2D, MaxPooling, PRelu, etc.
[0098] (3) The model graph is composed of nodes, each of which contains information such as data type, input, output, whether it is quantized, data dimension, and specific value.
[0099] The model conversion tool uses the intermediate reading parser to call the unified parsing interface (Universal Parse API) to read the model structure and data (the intermediate parsing adaptation layer implements the parsing of various framework models according to the Universal Parse API), and at the same time, according to the above-mentioned mobile terminal storage format, transfers the model into a model that can be loaded and run on the intelligent analysis module.
[0100] Refer to the following Figure 8 The electronic device 200 according to this embodiment of the present disclosure is described. Figure 8 The electronic device 200 shown is merely an example and should not bring any limitation to the functions and scope of use of the embodiments of the present disclosure.
[0101] like Figure 8 As shown, the electronic device 200 is in the form of a general computing device. The components of the electronic device 200 may include, but are not limited to: at least one processing unit 210, at least one storage unit 220, a bus 230 connecting different system components (including the storage unit 220 and the processing unit 210), a display unit 240, etc.
[0102] The storage unit stores a program code, which can be executed by the processing unit 210, so that the processing unit 210 executes the steps according to various exemplary embodiments of the present disclosure described in the electronic prescription circulation processing method section of this specification. For example, the processing unit 210 can execute the following steps: Figure 2 , Figure 3 Follow the steps shown in .
[0103] The storage unit 220 may include a readable medium in the form of a volatile storage unit, such as a random access memory unit (RAM) 2201 and / or a cache memory unit 2202 , and may further include a read-only memory unit (ROM) 2203 .
[0104] The storage unit 220 may also include a program / utility 2204 having a set (at least one) of program modules 2205, such program modules 2205 including but not limited to: an operating system, one or more application programs, other program modules and program data, each of which or some combination may include the implementation of a network environment.
[0105] Bus 230 may represent one or more of several types of bus structures, including a memory unit bus or memory unit controller, a peripheral bus, an accelerated graphics port, a processing unit, or a local bus using any of a variety of bus architectures.
[0106] The electronic device 200 may also communicate with one or more external devices 300 (e.g., keyboards, pointing devices, Bluetooth devices, etc.), may also communicate with one or more devices that enable a user to interact with the electronic device 200, and / or communicate with any device that enables the electronic device 200 to communicate with one or more other computing devices (e.g., routers, modems, etc.). Such communication may be performed via an input / output (I / O) interface 250. Furthermore, the electronic device 200 may also communicate with one or more networks (e.g., a local area network (LAN), a wide area network (WAN), and / or a public network, such as the Internet) via a network adapter 260. The network adapter 260 may communicate with other modules of the electronic device 200 via the bus 230. It should be understood that, although not shown in the figure, other hardware and / or software modules may be used in conjunction with the electronic device 200, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems.
[0107] Through the description of the above implementation, it is easy for those skilled in the art to understand that the example implementation described here can be implemented by software, or by software combined with necessary hardware. Therefore, the technical solution according to the implementation of the present disclosure can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (which can be a CD-ROM, a USB flash drive, a mobile hard disk, etc.) or on a network, including several instructions to enable a computing device (which can be a personal computer, a server, or a network device, etc.) to execute the above method according to the implementation of the present disclosure.
[0108] Fig. 9 A schematic diagram of a computer-readable storage medium in an exemplary embodiment of the present disclosure is schematically shown.
[0109] refer to Fig. 9 As shown, a program product 400 for implementing the above method according to an embodiment of the present disclosure is described, which can adopt a portable compact disk read-only memory (CD-ROM) and include program code, and can be run on a terminal device, such as a personal computer. However, the program product of the present disclosure is not limited thereto. In this document, a readable storage medium can be any tangible medium containing or storing a program, which can be used by or in combination with an instruction execution system, an apparatus or a device.
[0110] The program product may use any combination of one or more readable media. The readable medium may be a readable signal medium or a readable storage medium. The readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples (non-exhaustive list) of readable storage media include: an electrical connection with one or more wires, a portable disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above.
[0111] The computer readable storage medium may include a data signal propagated in a baseband or as part of a carrier wave, wherein a readable program code is carried. This propagated data signal may take a variety of forms, including but not limited to an electromagnetic signal, an optical signal, or any suitable combination of the above. The readable storage medium may also be any readable medium other than a readable storage medium, which may send, propagate, or transmit a program for use by an instruction execution system, an apparatus, or a device or used in combination with it. The program code contained on the readable storage medium may be transmitted with any appropriate medium, including but not limited to wireless, wired, optical cable, RF, etc., or any suitable combination of the above.
[0112] Program code for performing the operations of the present disclosure may be written in any combination of one or more programming languages, including object-oriented programming languages such as Java, C++, etc., and conventional procedural programming languages such as "C" or similar programming languages. The program code may be executed entirely on the user computing device, partially on the user device, as a separate software package, partially on the user computing device and partially on a remote computing device, or entirely on a remote computing device or server. In cases involving a remote computing device, the remote computing device may be connected to the user computing device through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computing device (e.g., through the Internet using an Internet service provider).
[0113] The computer-readable medium carries one or more programs. When the one or more programs are executed by the device, the computer-readable medium implements the following functions: real-time collection of data related to the vending device as data to be processed; inputting the data to be processed into at least one computing model, and splitting the data into multiple computing tasks based on the at least one computing model; distributing the multiple computing tasks to multiple computing units for computing according to predetermined rules; and integrating the computing results of the multiple computing tasks to generate processing results of the data to be processed.
[0114] Those skilled in the art will appreciate that the above modules can be distributed in the device according to the description of the embodiment, or can be changed accordingly and only used in one or more devices different from the embodiment. The modules of the above embodiments can be combined into one module, or further divided into multiple sub-modules.
[0115] Through the description of the above embodiments, it is easy for those skilled in the art to understand that the example embodiments described here can be implemented by software, or by software combined with necessary hardware. Therefore, the technical solution according to the embodiment of the present disclosure can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (which can be a CD-ROM, a USB flash drive, a mobile hard disk, etc.) or on a network, and includes several instructions to enable a computing device (which can be a personal computer, a server, a mobile terminal, or a network device, etc.) to execute the method according to the embodiment of the present disclosure.
[0116] The exemplary embodiments of the present disclosure are specifically shown and described above. It should be understood that the present disclosure is not limited to the detailed structures, configurations or implementations described herein; on the contrary, the present disclosure is intended to cover various modifications and equivalent configurations included in the spirit and scope of the appended claims.
Claims
1. A data processing method, applied to a vending device, characterized in that: include: collecting data related to the vending device in real time as data to be processed; Inputting the data to be processed into a plurality of computing models, and splitting the data to be processed into a plurality of computing tasks based on the plurality of computing models; The operation model includes: model version information, operator information and model graph information; Distributing the plurality of computing tasks to a plurality of computing units for computing according to a predetermined rule; the plurality of computing units are dispersedly located on the vending device; Integrating the computing results of the plurality of computing tasks to generate a processing result for the data to be processed; and Based on the processing result, further operating the vending device; The step of distributing the plurality of computing tasks to a plurality of computing units for computing according to a predetermined rule includes: When there are multiple vending devices, and the multiple vending devices communicate with each other, the vending device queries all computing units in the multiple vending devices and allocates computing tasks; The method further comprises: Adapting the multiple computing models to multiple vending device deployments through a set of codes through a unified neural network adaptation layer of a data processing device; The method further comprises: Acquire multiple first computing models from the server, read the structures and data of the multiple first computing models through the unified adaptation interface of the neural network unified adaptation layer, and convert the formats of the multiple first computing models according to the storage format of the vending device to generate the multiple computing models.
2. The method according to claim 1, characterized in that Also includes: When the distribution of the plurality of computing tasks according to a predetermined rule fails, the computing tasks are distributed to a spare computing unit for computing.
3. The method according to claim 1, characterized in that Distributing the plurality of computing tasks to a plurality of computing units for computing according to a predetermined rule comprises: Acquiring the computing capability of each computing unit and / or the distance information of the vending device; and At least one operable computing task is distributed to each computing unit according to the computing capability and / or the distance information.
4. The method according to claim 1, characterized in that Distributing the plurality of computing tasks to a plurality of computing units for computing according to a predetermined rule comprises: Acquiring multiple interface information of the multiple computing units; and The plurality of computing units are called according to the plurality of interface information to distribute the plurality of computing tasks to the plurality of computing units for computing.
5. The method according to claim 1, characterized in that The real-time collection of data related to the vending device as data to be processed includes: The data related to the vending device is collected in real time by sensors, wherein the sensors include: camera equipment, infrared sensors, distance sensors and / or ultrasonic sensors.
6. The method according to claim 5, characterized in that The real-time collection of data related to the vending device as data to be processed includes: Acquiring image data obtained by a camera installed on the vending device; and The image data is preprocessed to generate data to be processed.
7. A data processing device, applied to a vending device, characterized in that: include: A data acquisition module, used for collecting data related to the vending device in real time as data to be processed; A task splitting module, used for inputting the data to be processed into a plurality of computing models, and splitting the data to be processed into a plurality of computing tasks based on the plurality of computing models; The operation model includes: model version information, operator information and model graph information; A task distribution module, used for distributing the plurality of computing tasks to a plurality of computing units for computing according to a predetermined rule; the plurality of computing units are dispersedly located on the vending device; a data processing module, used for integrating the computing results of the plurality of computing tasks to generate a processing result for the data to be processed; and The remaining operation modules are used to further operate the vending device based on the processing results; The task distribution module is further used for, when there are multiple vending devices and the multiple vending devices communicate with each other, the vending device queries all computing units in the multiple vending devices and distributes computing tasks; Adapting the multiple computing models to multiple vending device deployments through a set of codes through a unified neural network adaptation layer of the data processing device; The task splitting module is also used to obtain multiple first computing models from the server, read the structure and data of the multiple first computing models through the unified adaptation interface of the neural network unified adaptation layer, and convert the format of the multiple first computing models according to the storage format of the vending device to generate the multiple computing models.
8. The device according to claim 7, characterized in that Also includes: The task distribution standby module is used to distribute the computing tasks to the standby computing unit for computing when the distribution of the multiple computing tasks fails according to a predetermined rule.
9. An electronic device, characterized in that: include: one or more processors; as well as A storage device for storing one or more programs; When the one or more programs are executed by the one or more processors, the one or more processors implement the method according to any one of claims 1 to 6.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the method according to any one of claims 1 to 6 is implemented.
