Data processing method, device, master chip, slave chip and system
By using the combination of master chips and multiple slave chips in the data processing system, using the local algorithm of slave chips to perform multiple types of data analysis, the problem of limited performance of processing chips cannot be loaded at the same time, and the complexity is achieved The various algorithm analysis requirements in scenarios have improved the system's data processing capabilities.
Patent Information
- Application Number
- CN201910554781.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2019-06-25
- Publication Date
- 2024-12-06
- Estimated Expiration
- 2039-06-25
Smart Images

Figure CN112130987B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of data processing technology, and in particular to a data processing method, device, master control chip, slave chip and system. Background Art
[0002] With the continuous development of society and the continuous progress of science and technology, the demand for data processing is getting higher and higher, and the types of data that need to be processed are increasing, and the amount of data is also increasing. In complex scenarios such as urban road monitoring and fire monitoring, due to the high complexity of the scenarios, different types of data processing are required in these scenarios.
[0003] The process of data processing generally involves using a preset algorithm to perform algorithmic analysis on the data, and then performing comprehensive processing on the results of the algorithmic analysis. The data processing process is implemented by a processing chip, which not only performs algorithmic analysis on the data, but also needs to perform other services.
[0004] However, due to the performance limitations of the processing chip, the number of algorithms that can be loaded and run on a processing chip is limited. If the demand for algorithm analysis is large, multiple types of algorithm analysis need to be performed on the data. However, due to performance limitations, the processing chip may only load part of the algorithms, resulting in the inability to meet the demand for multiple types of algorithm analysis on the data. Summary of the invention
[0005] The purpose of the embodiments of the present invention is to provide a data processing method, device, master chip, slave chip and system to meet the needs of performing multiple types of algorithm analysis on data. The specific technical solution is as follows:
[0006] In a first aspect, an embodiment of the present invention provides a data processing method, which is applied to a master control chip in a data processing system, wherein the data processing system includes a master control chip and multiple slave chips, and the method includes:
[0007] Acquire the data to be processed and algorithm information of each target algorithm for performing algorithm analysis on the data to be processed;
[0008] According to the algorithm information of each target algorithm and the correspondence between the preset algorithm information and the slave chip, the data to be processed is sent to the slave chip corresponding to the algorithm information of each target algorithm, so that the slave chip uses the locally loaded target algorithm to perform algorithm analysis on the data to be processed;
[0009] Receiving the algorithm analysis results returned by the slave chips corresponding to the algorithm information of each target algorithm;
[0010] The algorithm analysis results of each target algorithm are processed.
[0011] Optionally, the acquiring of the data to be processed and the algorithm information of each target algorithm for performing algorithm analysis on the data to be processed includes:
[0012] Receive a data message sent by a front-end device, wherein the data message includes data to be processed and scene information;
[0013] The scenario information is analyzed to determine algorithm information of each target algorithm for performing algorithm analysis on the data to be processed under the scenario represented by the scenario information.
[0014] Optionally, before sending the data to be processed to the slave chip corresponding to the algorithm information of each target algorithm according to the algorithm information of each target algorithm and the preset correspondence between the algorithm information and the slave chip, the method further includes:
[0015] According to the algorithm information of each target algorithm and the correspondence between the pre-set algorithm information and the slave chip, a loading instruction is sent to the slave chip corresponding to the algorithm information of each target algorithm, and the loading instruction includes the algorithm information of each target algorithm, so that the slave chip selects a target algorithm from the locally stored algorithms for loading according to the algorithm information of each target algorithm.
[0016] Optionally, before sending a load instruction to a slave chip corresponding to the algorithm information of each target algorithm according to the algorithm information of each target algorithm and a preset correspondence between the algorithm information and the slave chip, the method further includes:
[0017] According to the algorithm information of each target algorithm and the pre-set correspondence between the algorithm information and the slave chip, a query instruction is sent to the slave chip corresponding to the algorithm information of each target algorithm to query whether the algorithm loaded by the slave chip includes the target algorithm;
[0018] receiving the query result fed back by the slave chip;
[0019] If it is determined according to the query result that the algorithms loaded by the slave chip do not include the target algorithms, an unloading instruction is sent to the slave chip so that the slave chip unloads the locally loaded algorithms.
[0020] Optionally, before sending a load instruction to a slave chip corresponding to the algorithm information of each target algorithm according to the algorithm information of each target algorithm and a preset correspondence between the algorithm information and the slave chip, the method further includes:
[0021] Count the number of front-end devices;
[0022] The number of algorithm channels of the target algorithm is set to the number of devices, and the number of algorithm channels is carried into the load instruction.
[0023] Optionally, sending the to-be-processed data to the slave chip corresponding to the algorithm information of each target algorithm according to the algorithm information of each target algorithm and the preset correspondence between the algorithm information and the slave chip includes:
[0024] Monitor whether the performance of each slave chip has reached saturation;
[0025] According to the algorithm information of each target algorithm and the pre-set correspondence between the algorithm information and the slave chip, the data to be processed is sent to the slave chip whose performance is in a non-saturated state corresponding to the algorithm information of each target algorithm.
[0026] Optionally, the corresponding relationship includes: algorithm information of multiple target algorithms corresponds to one slave chip, or algorithm information of one target algorithm corresponds to one slave chip.
[0027] In a second aspect, an embodiment of the present invention provides a data processing method, which is applied to a slave chip in a data processing system, wherein the data processing system includes a master chip and multiple slave chips, and the method includes:
[0028] Receiving the data to be processed sent by the main control chip and the algorithm information of each target algorithm for performing algorithm analysis on the data to be processed;
[0029] According to the algorithm information of each target algorithm, a target algorithm is selected from the locally loaded algorithms to perform algorithm analysis on the data to be processed, and the algorithm analysis result is returned to the main control chip so that the main control chip processes the algorithm analysis result of each target algorithm.
[0030] Optionally, before receiving the data to be processed sent by the main control chip and the algorithm information of each target algorithm for performing algorithm analysis on the data to be processed, the method further includes:
[0031] receiving a loading instruction sent by the main control chip, wherein the loading instruction includes algorithm information of each target algorithm;
[0032] According to the algorithm information of each target algorithm, a target algorithm is selected from locally stored algorithms for loading.
[0033] Optionally, before receiving the loading instruction sent by the main control chip, the method further includes:
[0034] Receiving a query instruction sent by the main control chip;
[0035] Query the algorithm information of the locally loaded algorithm;
[0036] Feedback the query result to the master chip, wherein the query result includes the algorithm information of the loaded algorithm, so that if the master chip determines, based on the query result, that the loaded algorithm does not include the target algorithms, it sends an uninstall instruction to the slave chip;
[0037] receiving an uninstall instruction sent by the slave chip;
[0038] Unloads the loaded algorithm.
[0039] Optionally, the loading instruction also includes the device quantity of the front-end device;
[0040] The step of selecting a target algorithm from locally stored algorithms for loading according to the algorithm information of each target algorithm includes:
[0041] According to the algorithm information of each target algorithm, a target algorithm is selected from locally stored algorithms to load multiple algorithm channels, wherein the number of algorithm channels is equal to the number of devices.
[0042] In a third aspect, an embodiment of the present invention provides a data processing device, which is applied to a master control chip in a data processing system, wherein the data processing system includes a master control chip and multiple slave chips, and the device includes:
[0043] An acquisition module, used to acquire the data to be processed and algorithm information of each target algorithm for performing algorithm analysis on the data to be processed;
[0044] A sending module, used for sending the data to be processed to the slave chip corresponding to the algorithm information of each target algorithm according to the algorithm information of each target algorithm and the preset correspondence between the algorithm information and the slave chip, so that the slave chip uses the locally loaded target algorithm to perform algorithm analysis on the data to be processed;
[0045] A receiving module, used for receiving the algorithm analysis results returned by the slave chip corresponding to the algorithm information of each target algorithm;
[0046] A processing module is used to process the algorithm analysis results of each target algorithm.
[0047] Optionally, the acquisition module is specifically used to:
[0048] Receive a data message sent by a front-end device, wherein the data message includes data to be processed and scene information;
[0049] The scenario information is analyzed to determine algorithm information of each target algorithm for performing algorithm analysis on the data to be processed under the scenario represented by the scenario information.
[0050] Optionally, the sending module is also used to send loading instructions to the slave chips corresponding to the algorithm information of each target algorithm according to the algorithm information of each target algorithm and the correspondence between the pre-set algorithm information and the slave chips, and the loading instructions include the algorithm information of each target algorithm, so that the slave chip selects a target algorithm to load from the locally stored algorithms according to the algorithm information of each target algorithm.
[0051] Optionally, the sending module is further used to send a query instruction to the slave chip corresponding to the algorithm information of each target algorithm according to the algorithm information of each target algorithm and the preset correspondence between the algorithm information and the slave chip, so as to query whether the algorithm loaded by the slave chip includes the target algorithm;
[0052] The receiving module is further used to receive the query result fed back by the slave chip;
[0053] The sending module is further configured to send an uninstall instruction to the slave chip if it is determined according to the query result that the algorithms loaded by the slave chip do not include the target algorithms, so that the slave chip uninstalls the locally loaded algorithms.
[0054] Optionally, the device further comprises:
[0055] Statistics module, used to count the number of front-end devices;
[0056] A setting module is used to set the number of algorithm channels of the target algorithm to the number of devices, and carry the number of algorithm channels into the loading instruction.
[0057] Optionally, the sending module is specifically used to:
[0058] Monitor whether the performance of each slave chip has reached saturation;
[0059] According to the algorithm information of each target algorithm and the pre-set correspondence between the algorithm information and the slave chip, the data to be processed is sent to the slave chip whose performance is in a non-saturated state corresponding to the algorithm information of each target algorithm.
[0060] Optionally, the corresponding relationship includes: algorithm information of multiple target algorithms corresponds to one slave chip, or algorithm information of one target algorithm corresponds to one slave chip.
[0061] In a fourth aspect, an embodiment of the present invention provides a data processing device, which is applied to a slave chip in a data processing system, wherein the data processing system includes a master chip and multiple slave chips, and the device includes:
[0062] A receiving module, used for receiving the data to be processed sent by the main control chip and the algorithm information of each target algorithm for performing algorithm analysis on the data to be processed;
[0063] The sending module is used to select a target algorithm from the locally loaded algorithms to perform algorithm analysis on the data to be processed according to the algorithm information of each target algorithm, and return the algorithm analysis result to the main control chip so that the main control chip processes the algorithm analysis result of each target algorithm.
[0064] Optionally, the receiving module is further used to receive a loading instruction sent by the main control chip, wherein the loading instruction includes algorithm information of each target algorithm;
[0065] The device also includes:
[0066] The loading module is used to select a target algorithm from the locally stored algorithms for loading according to the algorithm information of each target algorithm.
[0067] Optionally, the receiving module is further used to receive a query instruction sent by the main control chip;
[0068] The device also includes:
[0069] The query module is used to query the algorithm information of the locally loaded algorithms;
[0070] The sending module is further used to feed back the query result to the master chip, wherein the query result includes the algorithm information of the loaded algorithm, so that if the master chip determines according to the query result that the loaded algorithm does not include the target algorithms, the master chip sends an uninstall instruction to the slave chip;
[0071] The receiving module is further used to receive an uninstall instruction sent by the slave chip;
[0072] The device also includes:
[0073] The unloading module is used to unload the loaded algorithm.
[0074] Optionally, the loading instruction also includes the device quantity of the front-end device;
[0075] The loading module is specifically used for:
[0076] According to the algorithm information of each target algorithm, a target algorithm is selected from locally stored algorithms to load multiple algorithm channels, wherein the number of algorithm channels is equal to the number of devices.
[0077] In a fifth aspect, an embodiment of the present invention provides a main control chip, comprising a processor and a memory, wherein the memory stores machine executable instructions that can be executed by the processor, and the machine executable instructions are loaded and executed by the processor to implement the method provided in the first aspect of the embodiment of the present invention.
[0078] In a sixth aspect, an embodiment of the present invention provides a machine-readable storage medium, in which a computer program is stored. When the computer program is executed by a processor, the method provided in the first aspect of the embodiment of the present invention is implemented.
[0079] In the seventh aspect, an embodiment of the present invention provides a slave chip, comprising a processor and a memory, wherein the memory stores machine executable instructions that can be executed by the processor, and the machine executable instructions are loaded and executed by the processor to implement the method provided in the second aspect of the embodiment of the present invention.
[0080] In an eighth aspect, an embodiment of the present invention provides a machine-readable storage medium, wherein the machine-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method provided in the second aspect of the embodiment of the present invention is implemented.
[0081] In a ninth aspect, an embodiment of the present invention provides a data processing system, comprising a master chip and a plurality of slave chips;
[0082] The master control chip is used to obtain the data to be processed and the algorithm information of each target algorithm for performing algorithm analysis on the data to be processed; according to the algorithm information of each target algorithm and the correspondence between the preset algorithm information and the slave chip, the data to be processed is sent to the slave chip corresponding to the algorithm information of each target algorithm; the algorithm analysis result returned by the slave chip corresponding to the algorithm information of each target algorithm is received; and the algorithm analysis result of each target algorithm is processed;
[0083] The slave chip is used to receive the data to be processed sent by the master chip and the algorithm information of each target algorithm for performing algorithmic analysis on the data to be processed; according to the algorithm information of each target algorithm, a target algorithm is selected from the locally loaded algorithms to perform algorithmic analysis on the data to be processed, and the algorithm analysis result is returned to the master chip.
[0084] An embodiment of the present invention provides a data processing method, device, master control chip, slave chip and system. The master control chip in the data processing system obtains the data to be processed and the algorithm information of each target algorithm for performing algorithmic analysis on the data to be processed. According to the algorithm information of each target algorithm and the correspondence between the preset algorithm information and the slave chip, the data to be processed is sent to the slave chip corresponding to the algorithm information of each target algorithm. After receiving the data to be processed, the slave chip uses the locally loaded target algorithm to perform algorithmic analysis on the data to be processed, and returns the algorithmic analysis result to the master control chip. The master control chip processes the received algorithmic analysis results of each target algorithm. The data processing system includes a master chip and multiple slave chips. The master chip is pre-set with a correspondence between algorithm information and slave chips. Different algorithms can be loaded on different slave chips. In this way, the data processing system can actually load and run a large number of algorithms. After the master chip obtains the data to be processed and the algorithm information of each target algorithm for performing algorithmic analysis on the data to be processed, it can find the corresponding slave chip according to the algorithm information, and then send the data to be processed to the slave chip. The slave chip can use the loaded target algorithm to perform algorithmic analysis on the data to be processed. Since different slave chips can load and run different algorithms, the algorithmic analysis of different target algorithms by multiple slave chips can meet the needs of performing multiple types of algorithmic analysis on data to a great extent. BRIEF DESCRIPTION OF THE DRAWINGS
[0085] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0086] Figure 1 A schematic flow chart of a data processing method for a main control chip in a data processing system according to an embodiment of the present invention;
[0087] Figure 2 It is a flow chart of a data processing method applied to a slave chip in a data processing system according to an embodiment of the present invention;
[0088] Figure 3 A schematic diagram of the structure of a monitoring system in a fire passage monitoring scenario according to an embodiment of the present invention;
[0089] Figure 4 A schematic diagram of a multi-front-end device multi-slave chip algorithm control strategy according to an embodiment of the present invention;
[0090] Figure 5A schematic diagram of a multi-front-end device single slave chip algorithm control strategy according to an embodiment of the present invention;
[0091] Figure 6 A schematic diagram of the structure of a data processing device applied to a main control chip in a data processing system according to an embodiment of the present invention;
[0092] Figure 7 A schematic diagram of the structure of a data processing device applied to a slave chip in a data processing system according to an embodiment of the present invention;
[0093] Figure 8 This is a schematic diagram of the structure of a main control chip according to an embodiment of the present invention;
[0094] Fig. 9 A schematic diagram of the structure of a slave chip according to an embodiment of the present invention;
[0095] Fig.10 Schematic diagram of the structure of a data processing system according to an embodiment of the present invention. DETAILED DESCRIPTION
[0096] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0097] In order to meet the needs of performing multiple types of algorithmic analysis on data, an embodiment of the present invention provides a data processing method, device, master control chip, slave chip and system.
[0098] The execution subject of the data processing method provided in the embodiment of the present invention may be a data processing system, which includes multiple processing chips, wherein one processing chip serves as a master chip and the other processing chips serve as slave chips. The data processing system may be a single processing device such as a controller or a server, that is, the master chip and the slave chips are on the same single device; the data processing system may also be a distributed cluster system, that is, the master chip and the slave chips are on different devices. Below, the data processing method provided in the embodiment of the present invention is introduced from the execution process of the master chip and the slave chip in the data processing system.
[0099] The embodiment of the present invention provides a data processing method, which is applied to the main control chip in the above data processing system, such as Figure 1 As shown, the data processing method may include the following steps:
[0100] S101, obtaining data to be processed and algorithm information of each target algorithm for performing algorithm analysis on the data to be processed.
[0101] The data to be processed is data that needs to be analyzed by algorithms, such as video data, voice data, picture data, etc. The data to be processed can be sent from a front-end device (such as an image acquisition device, a voice acquisition device, a video acquisition device, etc.), or can be directly input into the main control chip by the user according to needs.
[0102] There are different algorithm analysis requirements for different data to be processed, and for one data to be processed, it may be necessary to perform algorithm analysis operations of multiple target algorithms. For example, in the scenario of fire monitoring, it is necessary to identify targets such as debris, electric vehicles, and motor vehicles in the monitoring video. The identification of each target requires the use of a corresponding recognition algorithm, and a frame of video needs to be input into three algorithms for algorithm analysis. The target algorithm is the algorithm that needs to perform algorithm analysis on the data to be processed. It can be a user-specified algorithm or it can be obtained by the main control chip after analyzing the scene in which the front-end device is located. The algorithm information of the target algorithm can be the algorithm name, algorithm identifier, etc. of the target algorithm, which can uniquely represent a target algorithm.
[0103] Optionally, S101 may be implemented through the following steps:
[0104] Receive a data message sent by a front-end device, wherein the data message includes data to be processed and scene information; analyze the scene information, and determine algorithm information of each target algorithm for performing algorithm analysis on the data to be processed in the scene represented by the scene information.
[0105] In one implementation of the embodiment of the present invention, the front-end device will collect data in real time, and package the collected data and the scene information of the scene in which the front-end device is located and send them to the main control chip. The scene information is obtained after the front-end device identifies the monitoring scene after installation, or it can be input by the user on the front-end device after the front-end device is installed. The scene information is the name and identifier of the scene. For example, if the scene identifier of the fire passage detection is set to XF, the main control chip will parse the scene information of XF from the data message after receiving the data message, and can determine that the front-end device is in the fire passage detection scene.
[0106] After obtaining the data to be processed and the scene information, the main control chip analyzes the scene information and can determine the algorithm information of each target algorithm for algorithm analysis of the data to be processed in the scene. In a fixed scene, the target algorithm that needs to be analyzed is often fixed. For example, in the fire channel detection scene, the algorithm analysis of three algorithms, namely, debris accumulation, battery vehicle illegal parking, and motor vehicle illegal parking, is required. After determining the scene information, the algorithm information of each target algorithm can be determined accordingly.
[0107] S102 , according to the algorithm information of each target algorithm and the preset correspondence between the algorithm information and the slave chip, the data to be processed is sent to the slave chip corresponding to the algorithm information of each target algorithm.
[0108] The master chip is pre-set with the corresponding relationship between algorithm information and slave chips. Generally, one algorithm information corresponds to one slave chip, or multiple algorithm information corresponds to one slave chip. That is to say, one slave chip can load and run multiple algorithms at the same time, and the types of each algorithm can be the same or different. Specifically, the master chip can be set according to the performance requirements and scenarios of each slave chip. The types of algorithms loaded and run by the slave chip are all controlled by the master chip. The number of algorithms that each slave chip can run simultaneously is determined by the performance of the chip.
[0109] When it is necessary to perform algorithmic analysis of multiple target algorithms on the data to be processed, the data to be processed can be copied and then sent to different algorithm channels of different slave chips for algorithmic processing. Of course, the master chip can also directly send the data to be processed to each slave chip, and each slave chip will perform the copying and algorithmic analysis. After receiving the data to be processed, the slave chip can directly use the loaded target algorithm to perform algorithmic analysis on the data to be processed because the slave chip has already loaded the target algorithm locally.
[0110] Optionally, before executing S102, the data processing method provided in the embodiment of the present invention may further execute the following steps:
[0111] According to the algorithm information of each target algorithm and the pre-set correspondence between the algorithm information and the slave chip, a loading instruction is sent to the slave chip corresponding to the algorithm information of each target algorithm, wherein the loading instruction includes the algorithm information of each target algorithm.
[0112] In one implementation of the embodiment of the present invention, various algorithms to be loaded are stored on the slave chip. After the master chip obtains the algorithm information of each target algorithm for algorithm analysis of the data to be processed, the algorithm information of each target algorithm is sent to the corresponding slave chip in the form of a loading instruction according to the preset corresponding relationship. The loading instruction is a trigger instruction that drives the slave chip to load the algorithm. At this time, the slave chip receives the loading instruction, identifies the target algorithm to be loaded through character recognition, and identifies the algorithm information of the target algorithm to be loaded, and can select the target algorithm to be loaded from the locally stored algorithms for loading.
[0113] After the slave chip has loaded the target algorithm, it can perform corresponding algorithm analysis on the received data to be processed.
[0114] Of course, in another implementation, the algorithms on each slave chip can be pre-loaded, and after the data processing is set up, the target algorithm to be used can be loaded. In this case, the loaded target algorithm is often specified by the user.
[0115] Optionally, before executing the step of sending a load instruction to a slave chip corresponding to the algorithm information of each target algorithm according to the algorithm information of each target algorithm and the preset correspondence between the algorithm information and the slave chip, the data processing method provided by the embodiment of the present invention may further execute the following steps:
[0116] According to the algorithm information of each target algorithm and the correspondence between the pre-set algorithm information and the slave chip, a query instruction is sent to the slave chip corresponding to the algorithm information of each target algorithm to query whether the algorithm loaded by the slave chip includes each target algorithm; the query result fed back by the slave chip is received; if it is determined according to the query result that the algorithm loaded by the slave chip does not include each target algorithm, an unloading instruction is sent to the slave chip to enable the slave chip to unload the locally loaded algorithm.
[0117] Since the scene in which the front-end device is located may change, this change may be detected by the front-end device or input by the user. Once the scene changes, the algorithm information obtained by the master chip will also change accordingly. In order to ensure that the algorithm analysis performed by the slave chip can meet the changing scene, the master chip will send a query instruction to the corresponding slave chip after obtaining the algorithm information of each target algorithm. The slave chip receives the query instruction, and through character recognition, it recognizes that the master chip needs to query the algorithm currently loaded in the slave chip, and then it will feed back the algorithm information of the loaded algorithm to the master chip in the form of query results. Alternatively, the slave chip recognizes through character recognition that the master chip needs to query whether the algorithm currently loaded in the slave chip includes each target algorithm, and then it will query whether the currently loaded algorithm includes each target algorithm, and feed back the query result to the master chip.
[0118] The master chip receives the query result and uses it to determine whether the algorithm currently loaded by the slave chip includes the target algorithm. If not, it means that the scene of the front-end device has changed and the demand for algorithm analysis has changed. The master chip will send an uninstall instruction to the slave chip. The uninstall instruction is a trigger instruction to drive the algorithm to uninstall. After receiving the uninstall instruction, the slave chip will uninstall the locally loaded algorithm. After the locally loaded algorithm is uninstalled, the master chip sends a load instruction to the slave chip, and the slave chip can load the target algorithm under the corresponding new scene.
[0119] Of course, when the master chip sends an unloading instruction to the slave chip, it can also carry the algorithm information and the number of algorithms to be unloaded in the unloading instruction, so as to realize the requirement of configurable algorithm type and algorithm number during unloading; similarly, when the master chip sends a loading instruction to the slave chip, it can also carry the algorithm number of the algorithm to be loaded in the loading instruction, so as to realize the requirement of configurable algorithm type and algorithm number during loading.
[0120] Optionally, before executing the step of sending a load instruction to a slave chip corresponding to the algorithm information of each target algorithm according to the algorithm information of each target algorithm and the preset correspondence between the algorithm information and the slave chip, the data processing method provided by the embodiment of the present invention may further execute the following steps:
[0121] Count the number of devices on the front-end device; set the number of algorithm channels of the target algorithm to the number of devices, and carry the number of algorithm channels to the loading instruction.
[0122] In the same scenario, there may be multiple front-end devices, and the same algorithm analysis needs to be performed on the data collected by each front-end device. Therefore, the slave chip is required to load the target algorithm of multiple algorithm channels when loading the target algorithm. The master chip can count the number of front-end devices. Specifically, it can determine how many front-end devices there are by receiving several data packets. In this way, when the master chip sends a loading instruction to the slave chip, in addition to carrying the algorithm information of each target algorithm, it also needs to carry the number of algorithm channels. The number of algorithm channels carried is the same as the number of front-end devices. After receiving the loading instruction, the slave chip can know how many channels of algorithms need to be loaded, and accordingly, when loading the target algorithm, it loads multiple channels, that is, loads multiple identical target algorithms.
[0123] Optionally, S102 may be implemented through the following steps:
[0124] Monitor whether the performance of each slave chip has reached a saturated state; according to the algorithm information of each target algorithm and the correspondence between the preset algorithm information and the slave chip, send the data to be processed to the slave chip whose performance is in a non-saturated state corresponding to the algorithm information of each target algorithm.
[0125] The master chip needs to monitor the performance of each slave chip in real time. The specific monitoring method can be that the master chip sends a monitoring message to the slave chip. The slave chip receives the monitoring message and identifies the characters in the monitoring message to identify that the monitoring message is used to monitor the performance. It will then count the performance of the slave chip itself to determine whether it has reached the saturation state, and reply a message to the master chip, which carries the identification result of whether the performance has reached the saturation state. When the master chip sends the data to be processed, it will send the data to the corresponding slave chip in the non-saturated state. In this way, it can be ensured that the slave chip that processes the data is always in a non-saturated state, ensuring the normal processing of the data.
[0126] Optionally, the corresponding relationship may include: algorithm information of multiple target algorithms corresponds to one slave chip, or algorithm information of one target algorithm corresponds to one slave chip.
[0127] In an embodiment of the present invention, if the performance of the slave chip is good, multiple target algorithms can be loaded on one slave chip; if there are many types of target algorithms to be loaded and the performance of one slave chip cannot meet the requirements of loading multiple target algorithms, then one target algorithm is loaded on one slave chip.
[0128] S103, receiving the algorithm analysis result returned by the slave chip corresponding to the algorithm information of each target algorithm.
[0129] After performing algorithm analysis of the target algorithm on the data to be processed, each slave chip returns the algorithm analysis result to the master chip.
[0130] S104, processing the algorithm analysis results of each target algorithm.
[0131] After receiving the algorithm analysis results of each target algorithm on the processed data returned by each slave chip, the main control chip can process the algorithm analysis results of each target algorithm. The processing here may include alarm processing, comprehensive analysis processing, output processing, etc., which is not specifically limited here.
[0132] By applying the embodiment of the present invention, a main control chip in a data processing system obtains the data to be processed and the algorithm information of each target algorithm for performing algorithmic analysis on the data to be processed, and sends the data to be processed to the slave chip corresponding to the algorithm information of each target algorithm according to the algorithm information of each target algorithm and the correspondence between the pre-set algorithm information and the slave chip. After receiving the data to be processed, the slave chip uses the locally loaded target algorithm to perform algorithmic analysis on the data to be processed, and returns the algorithmic analysis result to the main control chip, and the main control chip processes the received algorithmic analysis results of each target algorithm. The data processing system includes a master chip and multiple slave chips. The master chip is pre-set with a correspondence between algorithm information and slave chips. Different algorithms can be loaded on different slave chips. In this way, the data processing system can actually load and run a large number of algorithms. After the master chip obtains the data to be processed and the algorithm information of each target algorithm for performing algorithmic analysis on the data to be processed, it can find the corresponding slave chip according to the algorithm information, and then send the data to be processed to the slave chip. The slave chip can use the loaded target algorithm to perform algorithmic analysis on the data to be processed. Since different slave chips can load and run different algorithms, the algorithmic analysis of different target algorithms by multiple slave chips can meet the needs of performing multiple types of algorithmic analysis on data to a great extent.
[0133] In addition, the system structure adopts one master chip and multiple slave chips. The type and quantity of the target algorithm loaded by the slave chip can be configured by the master chip, which enhances the flexibility of multi-algorithm collaboration; by reasonably allocating tasks between the master and slave chips, the data processing capability of the system is enhanced. Through the communication between the master chip and the slave chips, the algorithm analysis results of different slave chips can be further processed, improving the comprehensive and effective use of data.
[0134] The embodiment of the present invention provides a data processing method, which is applied to a slave chip in the above data processing system, such as Figure 2 As shown, the data processing method may include the following steps:
[0135] S201, receiving the data to be processed sent by the main control chip and the algorithm information of each target algorithm for performing algorithm analysis on the data to be processed.
[0136] After the master chip obtains the data to be processed and the algorithm information of each target algorithm for algorithm analysis of the data to be processed, it will send the data to be processed and the algorithm information of each target algorithm for algorithm analysis of the data to be processed to the slave chips corresponding to the target algorithms. For details on the steps of the master chip obtaining the data to be processed and the algorithm information of each target algorithm for algorithm analysis of the data to be processed, see Figure 1 The embodiments shown will not be described in detail here.
[0137] Optionally, after executing S201, the data processing method provided by the embodiment of the present invention may further execute the following steps:
[0138] A loading instruction sent by the main control chip is received, wherein the loading instruction includes algorithm information of each target algorithm; and a target algorithm is selected from locally stored algorithms for loading according to the algorithm information of each target algorithm.
[0139] In one implementation of the embodiment of the present invention, after the master chip obtains the algorithm information of each target algorithm for algorithm analysis of the data to be processed, it sends the algorithm information of each target algorithm to the corresponding slave chip in the form of a loading instruction according to the preset corresponding relationship. At this time, the slave chip receives the loading instruction, identifies the target algorithm to be loaded through character recognition, and identifies the algorithm information of the target algorithm to be loaded, and then selects the target algorithm to be loaded from the locally stored algorithms for loading.
[0140] Optionally, before executing the step of receiving the loading instruction sent by the main control chip, the data processing method provided by the embodiment of the present invention may further execute the following steps:
[0141] Receive a query instruction sent by the main control chip; query the algorithm information of the locally loaded algorithm; feed back the query result to the main control chip, wherein the query result includes the algorithm information of the loaded algorithm, so that if the main control chip determines based on the query result that the loaded algorithm does not include the target algorithms, it sends an unloading instruction to the slave chip; receive the unloading instruction sent by the slave chip; unload the loaded algorithm.
[0142] Since the scene in which the front-end device is located may change, this change may be detected by the front-end device or input by the user. Once the scene changes, the algorithm information obtained by the master chip will also change accordingly. In order to ensure that the algorithm analysis performed by the slave chip can meet the changing scene, the master chip will send a query instruction to the corresponding slave chip after obtaining the algorithm information of each target algorithm. The slave chip receives the query instruction, and through character recognition, it recognizes that the master chip needs to query the algorithm currently loaded in the slave chip, and then it will feed back the algorithm information of the loaded algorithm to the master chip in the form of query results. Alternatively, the slave chip recognizes through character recognition that the master chip needs to query whether the algorithm currently loaded in the slave chip includes each target algorithm, and then it will query whether the currently loaded algorithm includes each target algorithm, and feed back the query result to the master chip.
[0143] The master chip receives the query result and uses it to determine whether the algorithm currently loaded by the slave chip includes the target algorithm. If not, it means that the scene of the front-end device has changed and the demand for algorithm analysis has changed. The master chip will send an uninstall instruction to the slave chip. The uninstall instruction is a trigger instruction to drive the algorithm to uninstall. After receiving the uninstall instruction, the slave chip will uninstall the locally loaded algorithm. After the locally loaded algorithm is uninstalled, the master chip sends a load instruction to the slave chip, and the slave chip can load the target algorithm under the corresponding new scene.
[0144] Optionally, the loading instruction may further include the device number of the front-end device;
[0145] Then, according to the algorithm information of each target algorithm, the step of selecting the target algorithm from the locally stored algorithms for loading may specifically be:
[0146] According to the algorithm information of each target algorithm, a target algorithm is selected from the locally stored algorithms to load multiple algorithm channels, wherein the number of algorithm channels is equal to the number of devices.
[0147] In the same scenario, there may be multiple front-end devices, and the same algorithm analysis needs to be performed on the data collected by each front-end device. Therefore, the slave chip is required to load the target algorithm of multiple algorithm channels when loading the target algorithm. The master chip can count the number of front-end devices. Specifically, it can determine how many front-end devices there are by receiving several data packets. In this way, when the master chip sends a loading instruction to the slave chip, in addition to carrying the algorithm information of each target algorithm, it also needs to carry the number of algorithm channels. The number of algorithm channels carried is the same as the number of front-end devices. After receiving the loading instruction, the slave chip can know how many channels of algorithms need to be loaded, and accordingly, when loading the target algorithm, it loads multiple channels, that is, loads multiple identical target algorithms.
[0148] S202 , according to the algorithm information of each target algorithm, select a target algorithm from the locally loaded algorithms to perform algorithm analysis on the data to be processed, and return the algorithm analysis result to the main control chip.
[0149] After receiving the algorithm information of each target algorithm, the slave chip can select the target algorithm from the locally loaded algorithms according to the algorithm information to perform algorithm analysis on the data to be processed, obtain the algorithm analysis result, and then feed the algorithm analysis result back to the main control chip. After receiving the algorithm information results sent by each slave chip, the main control chip can process the algorithm analysis results of each target algorithm.
[0150] By applying the embodiment of the present invention, a main control chip in a data processing system obtains the data to be processed and the algorithm information of each target algorithm for performing algorithmic analysis on the data to be processed, and sends the data to be processed to the slave chip corresponding to the algorithm information of each target algorithm according to the algorithm information of each target algorithm and the correspondence between the pre-set algorithm information and the slave chip. After receiving the data to be processed, the slave chip uses the locally loaded target algorithm to perform algorithmic analysis on the data to be processed, and returns the algorithmic analysis result to the main control chip, and the main control chip processes the received algorithmic analysis results of each target algorithm. The data processing system includes a master chip and multiple slave chips. The master chip is pre-set with a correspondence between algorithm information and slave chips. Different algorithms can be loaded on different slave chips. In this way, the data processing system can actually load and run a large number of algorithms. After the master chip obtains the data to be processed and the algorithm information of each target algorithm for performing algorithmic analysis on the data to be processed, it can find the corresponding slave chip according to the algorithm information, and then send the data to be processed to the slave chip. The slave chip can use the loaded target algorithm to perform algorithmic analysis on the data to be processed. Since different slave chips can load and run different algorithms, the algorithmic analysis of different target algorithms by multiple slave chips can meet the needs of performing multiple types of algorithmic analysis on data to a great extent.
[0151] For ease of understanding, the following takes the application scenario of fire passage monitoring as an example to describe in detail the data processing method provided by the embodiment of the present invention. Figure 3 As shown, it includes a video acquisition device 311, a video acquisition device 312, a master chip 320, a slave chip 331 and a slave chip 332.
[0152] The video acquisition device 311 and the video acquisition device 312 are used to collect the original video data in the application scenario. In the application scenario of fire passage monitoring, it is forbidden to park electric bicycles and all motor vehicles in the fire passage, and the fire passage is strictly prohibited from being blocked by debris. Therefore, it is necessary to perform a debris stacking algorithm detection on the fire passage, and an alarm is triggered when debris occupies it. It is also necessary to perform a battery car and motor vehicle parking detection. When a battery car or other motor vehicle is parked illegally, an alarm is triggered, and the alarm information is uploaded to the management personnel and the violators are prompted to move the vehicle away. This requires three algorithms: analyzing whether there are debris stacked in the fire passage, whether there are battery cars parked, and whether there are motor vehicles parked. Therefore, it is necessary to select a slave chip to load three different algorithms through the main control chip 320. The same chip can be selected to load three different algorithms, or three chips can be selected to load three different algorithms respectively. The loading method can be configured by the main control chip. For example, if the performance of slave chip 331 is better, slave chip 331 can be configured to load two algorithms, for example, slave chip 331 loads an algorithm for analyzing whether there are debris piled up in the fire passage and an algorithm for analyzing whether there are electric vehicles parked in the fire passage. If the performance of slave chip 332 is poor, slave chip 332 can be configured to load an algorithm for analyzing whether there are motor vehicles parked in the fire passage.
[0153] After receiving the data message sent by the video acquisition device 311, the main control chip 320 recognizes that the data to be processed needs to be analyzed by the above three algorithms, and will send the data to be processed to the slave chip 331 and the slave chip 332. The slave chip 331 will analyze the data to be processed by algorithms to determine whether there are debris piled in the fire passage and whether there are electric vehicles parked there. The slave chip 332 will analyze the data to be processed by algorithms to determine whether there are motor vehicles parked in the fire passage.
[0154] After the slave chip 331 and the slave chip 332 perform algorithm analysis and obtain algorithm analysis results, the algorithm analysis results are sent back to the master chip 320, and then the master chip 320 performs subsequent processing.
[0155] In another use case, when there are many front-end devices and many types of algorithms, the slave chips load different algorithms. Too many algorithms loaded on a slave chip will affect the performance of the slave chip. In this use case, each slave chip can be selected to load only one algorithm, which can reduce the performance problem caused by loading different algorithms. Figure 4 As shown, when a front-end device requires multiple algorithm analyses, the data to be processed can be sent to slave chips loaded with different algorithms through the master chip at the same time for algorithm analysis.
[0156] When there are fewer front-end devices and each front-end device only needs to perform one algorithm analysis, such as Figure 5 As shown, different algorithms can be loaded on the same slave chip according to the performance of the slave chip, and corresponding algorithm analysis can be performed on each front-end device.
[0157] Corresponding to the above method embodiment, the embodiment of the present invention provides a data processing device, which is applied to a main control chip in a data processing system, such as Figure 6 As shown, the data processing device may include:
[0158] An acquisition module 610 is used to acquire the data to be processed and the algorithm information of each target algorithm for performing algorithm analysis on the data to be processed;
[0159] The sending module 620 is used to send the data to be processed to the slave chip corresponding to the algorithm information of each target algorithm according to the algorithm information of each target algorithm and the preset correspondence between the algorithm information and the slave chip, so that the slave chip uses the locally loaded target algorithm to perform algorithm analysis on the data to be processed;
[0160] A receiving module 630 is used to receive the algorithm analysis result returned by the slave chip corresponding to the algorithm information of each target algorithm;
[0161] The processing module 640 is used to process the algorithm analysis results of each target algorithm.
[0162] Optionally, the acquisition module 610 may be specifically used for:
[0163] Receive a data message sent by a front-end device, wherein the data message includes data to be processed and scene information;
[0164] The scenario information is analyzed to determine algorithm information of each target algorithm for performing algorithm analysis on the data to be processed under the scenario represented by the scenario information.
[0165] Optionally, the sending module 620 can also be used to send loading instructions to the slave chips corresponding to the algorithm information of each target algorithm according to the algorithm information of each target algorithm and the correspondence between the pre-set algorithm information and the slave chips, and the loading instructions include the algorithm information of each target algorithm, so that the slave chip selects the target algorithm from the locally stored algorithms for loading according to the algorithm information of each target algorithm.
[0166] Optionally, the sending module 620 may also be used to send a query instruction to the slave chip corresponding to the algorithm information of each target algorithm according to the algorithm information of each target algorithm and the preset correspondence between the algorithm information and the slave chip, so as to query whether the algorithm loaded by the slave chip includes the target algorithm;
[0167] The receiving module 630 may also be used to receive the query result fed back by the slave chip;
[0168] The sending module 620 may also be configured to send an uninstall instruction to the slave chip if it is determined according to the query result that the algorithms loaded by the slave chip do not include the target algorithms, so that the slave chip uninstalls the locally loaded algorithms.
[0169] Optionally, the device may further include:
[0170] Statistics module, used to count the number of front-end devices;
[0171] A setting module is used to set the number of algorithm channels of the target algorithm to the number of devices, and carry the number of algorithm channels into the loading instruction.
[0172] Optionally, the sending module 620 may be specifically used for:
[0173] Monitor whether the performance of each slave chip has reached saturation;
[0174] According to the algorithm information of each target algorithm and the pre-set correspondence between the algorithm information and the slave chip, the data to be processed is sent to the slave chip whose performance is in a non-saturated state corresponding to the algorithm information of each target algorithm.
[0175] Optionally, the corresponding relationship may include: algorithm information of multiple target algorithms corresponds to one slave chip, or algorithm information of one target algorithm corresponds to one slave chip.
[0176] The embodiment of the present invention further provides a data processing device, which is applied to a slave chip in a data processing system, such as Figure 7 As shown, the data processing device may include:
[0177] The receiving module 710 is used to receive the data to be processed sent by the main control chip and the algorithm information of each target algorithm for performing algorithm analysis on the data to be processed;
[0178] The sending module 720 is used to select a target algorithm from the locally loaded algorithms to perform algorithm analysis on the data to be processed according to the algorithm information of each target algorithm, and return the algorithm analysis result to the main control chip so that the main control chip processes the algorithm analysis results of each target algorithm.
[0179] Optionally, the receiving module 710 may also be used to receive a loading instruction sent by the main control chip, where the loading instruction includes algorithm information of each target algorithm;
[0180] The device may also include:
[0181] The loading module is used to select a target algorithm from the locally stored algorithms for loading according to the algorithm information of each target algorithm.
[0182] Optionally, the receiving module 710 may also be used to receive a query instruction sent by the main control chip;
[0183] The device may also include:
[0184] The query module is used to query the algorithm information of the locally loaded algorithms;
[0185] The sending module 720 may also be used to feed back a query result to the master chip, wherein the query result includes the algorithm information of the loaded algorithm, so that if the master chip determines, based on the query result, that the loaded algorithm does not include the target algorithm, it sends an uninstall instruction to the slave chip;
[0186] The receiving module 710 may also be used to receive an uninstall instruction sent by the slave chip;
[0187] The device may also include:
[0188] The unloading module is used to unload the loaded algorithm.
[0189] Optionally, the loading instruction may also include the device quantity of the front-end device;
[0190] The loading module can be specifically used for:
[0191] According to the algorithm information of each target algorithm, a target algorithm is selected from locally stored algorithms to load multiple algorithm channels, wherein the number of algorithm channels is equal to the number of devices.
[0192] By applying the embodiment of the present invention, a main control chip in a data processing system obtains the data to be processed and the algorithm information of each target algorithm for performing algorithmic analysis on the data to be processed, and sends the data to be processed to the slave chip corresponding to the algorithm information of each target algorithm according to the algorithm information of each target algorithm and the correspondence between the pre-set algorithm information and the slave chip. After receiving the data to be processed, the slave chip uses the locally loaded target algorithm to perform algorithmic analysis on the data to be processed, and returns the algorithmic analysis result to the main control chip, and the main control chip processes the received algorithmic analysis results of each target algorithm. The data processing system includes a master chip and multiple slave chips. The master chip is pre-set with a correspondence between algorithm information and slave chips. Different algorithms can be loaded on different slave chips. In this way, the data processing system can actually load and run a large number of algorithms. After the master chip obtains the data to be processed and the algorithm information of each target algorithm for performing algorithmic analysis on the data to be processed, it can find the corresponding slave chip according to the algorithm information, and then send the data to be processed to the slave chip. The slave chip can use the loaded target algorithm to perform algorithmic analysis on the data to be processed. Since different slave chips can load and run different algorithms, the algorithmic analysis of different target algorithms by multiple slave chips can meet the needs of performing multiple types of algorithmic analysis on data to a great extent.
[0193] The embodiment of the present invention also provides a main control chip, such as Figure 8 As shown, it includes a processor 801 and a memory 802, wherein the memory 802 stores machine executable instructions that can be executed by the processor 801, and the machine executable instructions are loaded and executed by the processor 801 to implement the data processing method applied to the main control chip provided in an embodiment of the present invention.
[0194] The embodiment of the present invention further provides a slave chip, such as Fig. 9 As shown, it includes a processor 901 and a memory 902, wherein the memory 902 stores machine executable instructions that can be executed by the processor 901, and the machine executable instructions are loaded and executed by the processor 901 to implement the data processing method applied to the slave chip provided in an embodiment of the present invention.
[0195] The memory may include RAM (Random Access Memory), or NVM (Non-volatile Memory), such as at least one disk memory. Optionally, the memory may also be at least one storage device located away from the processor.
[0196] The above-mentioned processor can be a general-purpose processor, including a CPU (Central Processing Unit), NP (Network Processor), etc.; it can also be a DSP (Digital Signal Processor), ASIC (Application Specific Integrated Circuit), FPGA (Field-Programmable Gate Array) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components.
[0197] Data can be transmitted between the memory 802 and the processor 801, and between the memory 902 and the processor 901 through a wired connection or a wireless connection, and the chip and other devices can communicate through a wired communication interface or a wireless communication interface. Figure 8 and Fig. 9 What is shown is only an example of data transmission via a bus and is not intended to be a limitation on a specific connection method.
[0198] In the embodiment of the present invention, the processor can achieve the following by reading the machine executable instructions stored in the memory and by loading and executing the machine executable instructions: the main control chip in the data processing system obtains the data to be processed and the algorithm information of each target algorithm for performing algorithmic analysis on the data to be processed, and sends the data to be processed to the slave chip corresponding to the algorithm information of each target algorithm according to the algorithm information of each target algorithm and the correspondence between the pre-set algorithm information and the slave chip; after receiving the data to be processed, the slave chip uses the locally loaded target algorithm to perform algorithmic analysis on the data to be processed, and returns the algorithmic analysis result to the main control chip; the main control chip processes the received algorithmic analysis results of each target algorithm. The data processing system includes a master chip and multiple slave chips. The master chip is pre-set with a correspondence between algorithm information and slave chips. Different algorithms can be loaded on different slave chips. In this way, the data processing system can actually load and run a large number of algorithms. After the master chip obtains the data to be processed and the algorithm information of each target algorithm for performing algorithmic analysis on the data to be processed, it can find the corresponding slave chip according to the algorithm information, and then send the data to be processed to the slave chip. The slave chip can use the loaded target algorithm to perform algorithmic analysis on the data to be processed. Since different slave chips can load and run different algorithms, the algorithmic analysis of different target algorithms by multiple slave chips can meet the needs of performing multiple types of algorithmic analysis on data to a great extent.
[0199] In addition, an embodiment of the present invention further provides a machine-readable storage medium, in which a computer program is stored. When the computer program is executed by a processor, the data processing method applied to a main control chip provided by an embodiment of the present invention is implemented.
[0200] An embodiment of the present invention further provides a machine-readable storage medium, in which a computer program is stored. When the computer program is executed by a processor, the data processing method applied to a slave chip provided by an embodiment of the present invention is implemented.
[0201] In an embodiment of the present invention, a machine-readable storage medium stores machine executable instructions for executing the data processing method provided by the embodiment of the present invention at runtime, thereby being able to achieve: a main control chip in a data processing system obtains the data to be processed and the algorithm information of each target algorithm for performing algorithmic analysis on the data to be processed, and sends the data to be processed to the slave chip corresponding to the algorithm information of each target algorithm according to the algorithm information of each target algorithm and the correspondence between the pre-set algorithm information and the slave chip. After receiving the data to be processed, the slave chip uses the locally loaded target algorithm to perform algorithmic analysis on the data to be processed, and returns the algorithmic analysis result to the main control chip, and the main control chip processes the received algorithmic analysis results of each target algorithm. The data processing system includes a master chip and multiple slave chips. The master chip is pre-set with a correspondence between algorithm information and slave chips. Different algorithms can be loaded on different slave chips. In this way, the data processing system can actually load and run a large number of algorithms. After the master chip obtains the data to be processed and the algorithm information of each target algorithm for performing algorithmic analysis on the data to be processed, it can find the corresponding slave chip according to the algorithm information, and then send the data to be processed to the slave chip. The slave chip can use the loaded target algorithm to perform algorithmic analysis on the data to be processed. Since different slave chips can load and run different algorithms, the algorithmic analysis of different target algorithms by multiple slave chips can meet the needs of performing multiple types of algorithmic analysis on data to a great extent.
[0202] The embodiment of the present invention also provides a data processing system, such as Fig.10 As shown, it includes a master chip 1010 and multiple slave chips 1020;
[0203] The main control chip 1010 is used to obtain the data to be processed and the algorithm information of each target algorithm for performing algorithm analysis on the data to be processed; according to the algorithm information of each target algorithm and the correspondence between the preset algorithm information and the slave chip, the data to be processed is sent to the slave chip corresponding to the algorithm information of each target algorithm; the algorithm analysis result returned by the slave chip corresponding to the algorithm information of each target algorithm is received; and the algorithm analysis result of each target algorithm is processed;
[0204] The slave chip 1020 is used to receive the data to be processed sent by the master chip and the algorithm information of each target algorithm for performing algorithmic analysis on the data to be processed; according to the algorithm information of each target algorithm, a target algorithm is selected from the locally loaded algorithms to perform algorithmic analysis on the data to be processed, and the algorithm analysis result is returned to the master chip.
[0205] Fig.10 The data processing system shown may be a single processing device or a distributed cluster system, which is not specifically limited here.
[0206] By applying the embodiment of the present invention, a main control chip in a data processing system obtains the data to be processed and the algorithm information of each target algorithm for performing algorithmic analysis on the data to be processed, and sends the data to be processed to the slave chip corresponding to the algorithm information of each target algorithm according to the algorithm information of each target algorithm and the correspondence between the pre-set algorithm information and the slave chip. After receiving the data to be processed, the slave chip uses the locally loaded target algorithm to perform algorithmic analysis on the data to be processed, and returns the algorithmic analysis result to the main control chip, and the main control chip processes the received algorithmic analysis results of each target algorithm. The data processing system includes a master chip and multiple slave chips. The master chip is pre-set with a correspondence between algorithm information and slave chips. Different algorithms can be loaded on different slave chips. In this way, the data processing system can actually load and run a large number of algorithms. After the master chip obtains the data to be processed and the algorithm information of each target algorithm for performing algorithmic analysis on the data to be processed, it can find the corresponding slave chip according to the algorithm information, and then send the data to be processed to the slave chip. The slave chip can use the loaded target algorithm to perform algorithmic analysis on the data to be processed. Since different slave chips can load and run different algorithms, the algorithmic analysis of different target algorithms by multiple slave chips can meet the needs of performing multiple types of algorithmic analysis on data to a great extent.
[0207] For the master chip, slave chip, machine-readable storage medium and data processing system embodiments, since the method contents involved are basically similar to the aforementioned method embodiments, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiments.
[0208] It should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or device including the elements.
[0209] Each embodiment in this specification is described in a related manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the device, master chip, slave chip, machine-readable storage medium, and data processing system embodiments, since they are basically similar to the method embodiments, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiments.
[0210] The above description is only a preferred embodiment of the present invention and is not intended to limit the protection scope of the present invention. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention are included in the protection scope of the present invention.
Claims
1. A data processing method, characterized in that: A master control chip applied to a data processing system, the data processing system comprising a master control chip and a plurality of slave chips, the method comprising: Receiving a data message sent by a front-end device, the data message including data to be processed and scene information, the scene information being obtained after the front-end device identifies the monitoring scene after installation, and the scene information being an identifier and / or name of the scene; Analyze the scene information to determine algorithm information of each target algorithm for performing algorithm analysis on the data to be processed under the scene represented by the scene information, wherein each target algorithm is a plurality of different target algorithms for performing algorithm analysis on the data to be processed; According to the algorithm information of each target algorithm and the pre-set correspondence between the algorithm information and the slave chip, a query instruction is sent to each slave chip corresponding to the algorithm information of each target algorithm to query whether the algorithms loaded by each slave chip include the target algorithm; receiving query results fed back by each slave chip; If it is determined according to the query result that the algorithms loaded by each slave chip do not include the target algorithms, an unloading instruction is sent to each slave chip so that each slave chip unloads the locally loaded algorithms; According to the algorithm information of each target algorithm and the correspondence between the preset algorithm information and the slave chip, a loading instruction is sent to each slave chip corresponding to the algorithm information of each target algorithm, wherein the loading instruction includes the algorithm information of each target algorithm, so that each slave chip selects a target algorithm from the locally stored algorithms for loading according to the algorithm information of each target algorithm; According to the algorithm information of each target algorithm and the correspondence between the preset algorithm information and the slave chip, the data to be processed are respectively sent to the slave chips corresponding to the algorithm information of each target algorithm, so that each slave chip uses the locally loaded target algorithm to perform algorithm analysis on the data to be processed respectively; receiving a plurality of algorithm analysis results returned by the slave chips corresponding to the algorithm information of each target algorithm; The multiple algorithm analysis results of the target algorithms are processed.
2. The method according to claim 1, characterized in that Before sending a load instruction to the slave chip corresponding to the algorithm information of each target algorithm according to the algorithm information of each target algorithm and the preset correspondence between the algorithm information and the slave chip, the method further includes: Count the number of front-end devices; The number of algorithm channels of the target algorithm is set to the number of devices, and the number of algorithm channels is carried into the load instruction.
3. The method according to claim 1, characterized in that The step of sending the to-be-processed data to the slave chips corresponding to the algorithm information of the target algorithms according to the algorithm information of the target algorithms and the preset correspondence between the algorithm information and the slave chips comprises: Monitor whether the performance of each slave chip has reached saturation; According to the algorithm information of each target algorithm and the pre-set correspondence between the algorithm information and the slave chip, the data to be processed is sent to the slave chip whose performance is in a non-saturated state corresponding to the algorithm information of each target algorithm.
4. The method according to claim 1, characterized in that: The corresponding relationship includes: algorithm information of multiple target algorithms corresponds to one slave chip, or algorithm information of one target algorithm corresponds to one slave chip.
5. A data processing method, characterized in that: A slave chip applied to a data processing system, wherein the data processing system includes a master chip and a plurality of slave chips, and the method includes: Receiving a query instruction sent by the main control chip; Query the algorithm information of the locally loaded algorithm; Feedback the query result to the master chip, wherein the query result includes the algorithm information of the loaded algorithm, so that if the master chip determines, based on the query result, that the loaded algorithm does not include each target algorithm, it sends an uninstall instruction to the slave chip; receiving an uninstall instruction sent by the slave chip; Unloading the loaded algorithm; receiving a loading instruction sent by the main control chip, wherein the loading instruction includes algorithm information of each target algorithm; According to the algorithm information of each target algorithm, a target algorithm is selected from locally stored algorithms for loading; Receive the data to be processed sent by the main control chip and algorithm information of each target algorithm for performing algorithm analysis on the data to be processed, wherein each target algorithm is determined based on a scene represented by the scene information included in the data message sent by the front-end device, and each target algorithm is a plurality of different target algorithms for performing algorithm analysis on the data to be processed, and the scene information is obtained after the front-end device identifies the monitoring scene after installation, and the scene information is an identifier and / or name of the scene; According to the algorithm information of each target algorithm, a target algorithm is selected from the locally loaded algorithms to perform algorithm analysis on the data to be processed, and multiple algorithm analysis results are returned to the main control chip so that the main control chip processes the multiple algorithm analysis results of each target algorithm.
6. The method according to claim 5, characterized in that The loading instruction also includes the device quantity of the front-end device; The step of selecting a target algorithm from locally stored algorithms for loading according to the algorithm information of each target algorithm includes: According to the algorithm information of each target algorithm, a target algorithm is selected from locally stored algorithms to load multiple algorithm channels, wherein the number of algorithm channels is equal to the number of devices.
7. A data processing device, characterized in that: A master control chip applied to a data processing system, the data processing system comprising a master control chip and a plurality of slave chips, the device comprising: An acquisition module, used to acquire the data to be processed and algorithm information of each target algorithm for performing algorithm analysis on the data to be processed; A sending module, used for sending the data to be processed to the slave chips corresponding to the algorithm information of the target algorithms according to the algorithm information of the target algorithms and the pre-set correspondence between the algorithm information and the slave chips, so that the slave chips can use the locally loaded target algorithms to perform algorithm analysis on the data to be processed respectively; A receiving module, used for receiving the algorithm analysis results returned by the slave chip corresponding to the algorithm information of each target algorithm; A processing module, used for processing the algorithm analysis results of each target algorithm; The acquisition module is specifically used to receive a data message sent by a front-end device; analyze the scene information to determine the algorithm information of each target algorithm for performing algorithm analysis on the data to be processed under the scene represented by the scene information; the data message includes the data to be processed and the scene information, the target algorithms are multiple different target algorithms for performing algorithm analysis on the data to be processed, the scene information is obtained after the front-end device identifies the monitoring scene after installation, and the scene information is the identifier and / or name of the scene; The sending module is further used for, before the step of sending the to-be-processed data to the slave chips corresponding to the algorithm information of the target algorithms according to the algorithm information of the target algorithms and the preset corresponding relationship between the algorithm information and the slave chips, sending a query instruction to the slave chips corresponding to the algorithm information of the target algorithms according to the algorithm information of the target algorithms and the preset corresponding relationship between the algorithm information and the slave chips, so as to query whether the algorithms loaded by the slave chips include the target algorithms; receiving the query results fed back by the slave chips; if it is determined according to the query results that the algorithms loaded by the slave chips do not include the target algorithms, sending an unloading instruction to the slave chips, so that the slave chips unload the locally loaded algorithms; sending a loading instruction to the slave chips corresponding to the algorithm information of the target algorithms according to the algorithm information of the target algorithms and the preset corresponding relationship between the algorithm information and the slave chips, the loading instruction including the algorithm information of the target algorithms, so that the slave chips select the target algorithm from the locally stored algorithms for loading according to the algorithm information of the target algorithms.
8. A data processing device, characterized in that: A slave chip used in a data processing system, wherein the data processing system includes a master chip and multiple slave chips, and the device includes: A receiving module, used for receiving the data to be processed sent by the main control chip and algorithm information of each target algorithm for performing algorithm analysis on the data to be processed, wherein each target algorithm is determined based on a scene represented by the scene information included in the data message sent by the front-end device, and each target algorithm is a plurality of different target algorithms for performing algorithm analysis on the data to be processed; A sending module, used for selecting a target algorithm from locally loaded algorithms according to the algorithm information of each target algorithm to perform algorithm analysis on the data to be processed respectively, and returning multiple algorithm analysis results to the main control chip, so that the main control chip processes the multiple algorithm analysis results of each target algorithm; The receiving module is also used to receive a query instruction sent by the main control chip before the step of receiving the data to be processed sent by the main control chip and the algorithm information of each target algorithm for algorithmic analysis of the data to be processed; query the algorithm information of the locally loaded algorithm; and feed back the query result to the main control chip, wherein the query result includes the algorithm information of the loaded algorithm, so that if the main control chip determines, based on the query result, that the loaded algorithm does not include the target algorithms, then the main control chip sends an unloading instruction to the slave chip; receives the unloading instruction sent by the slave chip; unloads the loaded algorithm; receives the loading instruction sent by the main control chip, wherein the loading instruction includes the algorithm information of each target algorithm; and selects a target algorithm from the locally stored algorithms for loading according to the algorithm information of each target algorithm. The scene information is obtained after the front-end device identifies the monitoring scene after installation, and the scene information is the identifier and / or name of the scene.
9. A main control chip, characterized in that: The method comprises a processor and a memory, wherein the memory stores machine executable instructions that can be executed by the processor, and the machine executable instructions are loaded and executed by the processor to implement the method according to any one of claims 1 to 4.
10. A machine-readable storage medium, characterized in that: The machine-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method according to any one of claims 1 to 4 is implemented.
11. A slave chip, characterized in that: The invention comprises a processor and a memory, wherein the memory stores machine executable instructions that can be executed by the processor, and the machine executable instructions are loaded and executed by the processor to implement the method of claim 5 or 6.
12. A machine-readable storage medium, characterized in that: The machine-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method according to claim 5 or 6 is implemented.
13. A data processing system, characterized in that: It includes a master chip and multiple slave chips; The main control chip is used to receive data messages sent by the front-end device; Analyze the scene information to determine algorithm information of each target algorithm for performing algorithm analysis on the data to be processed under the scene represented by the scene information; According to the algorithm information of each target algorithm and the correspondence between the preset algorithm information and the slave chip, the data to be processed are respectively sent to the slave chips corresponding to the algorithm information of each target algorithm; multiple algorithm analysis results returned by the slave chips corresponding to the algorithm information of each target algorithm are received; the multiple algorithm analysis results of each target algorithm are processed, the data message includes the data to be processed and the scene information, the target algorithms are multiple different target algorithms for performing algorithm analysis on the data to be processed, the scene information is obtained after the front-end device identifies the monitoring scene after installation, and the scene information is the identification and / or name of the scene; The slave chip is used to receive the data to be processed sent by the master chip and the algorithm information of each target algorithm for performing algorithm analysis on the data to be processed; According to the algorithm information of each target algorithm, a target algorithm is selected from the locally loaded algorithms to perform algorithm analysis on the data to be processed respectively, and multiple algorithm analysis results are returned to the main control chip; The master control chip is further used for, before the step of sending the to-be-processed data to the slave chips corresponding to the algorithm information of the target algorithms respectively according to the algorithm information of the target algorithms and the pre-set correspondence between the algorithm information and the slave chips, sending a query instruction to the slave chips corresponding to the algorithm information of the target algorithms according to the algorithm information of the target algorithms and the pre-set correspondence between the algorithm information and the slave chips, so as to query whether the algorithms loaded by the slave chips include the target algorithms; and receiving the query results fed back by the slave chips; If it is determined according to the query result that the algorithms loaded by the slave chips do not include the target algorithms, an unloading instruction is sent to the slave chips to enable the slave chips to unload the locally loaded algorithms; according to the algorithm information of the target algorithms and the correspondence between the preset algorithm information and the slave chips, a loading instruction is sent to the slave chips corresponding to the algorithm information of the target algorithms, wherein the loading instruction includes the algorithm information of the target algorithms, so that the slave chips select the target algorithms from the locally stored algorithms for loading according to the algorithm information of the target algorithms; The slave chip is also used to receive a query instruction sent by the master control chip before the step of receiving the data to be processed sent by the master control chip and the algorithm information of each target algorithm for performing algorithmic analysis on the data to be processed; query the algorithm information of the locally loaded algorithm; and feed back the query result to the master control chip, wherein the query result includes the algorithm information of the loaded algorithm, so that if the master control chip determines, based on the query result, that the loaded algorithm does not include the target algorithms, the master control chip sends an unloading instruction to the slave chip; receives the unloading instruction sent by the slave chip; unloads the loaded algorithm; receives the loading instruction sent by the master control chip, wherein the loading instruction includes the algorithm information of each target algorithm; and selects a target algorithm from the locally stored algorithms for loading according to the algorithm information of each target algorithm.
