Data distribution method, device, storage medium and server
By identifying the data type and distributing it to the target processing unit, the problem of low data processing efficiency in electronic devices and servers is solved, distributed processing is realized, congestion and delay are reduced, and data processing efficiency is improved.
Patent Information
- Application Number
- CN201910282093.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2019-04-09
- Publication Date
- 2024-12-31
- Estimated Expiration
- 2039-04-09
AI Technical Summary
The prior art is difficult to efficiently process congestion and delays when large amounts of data are processed, especially in data transmission between electronic devices and servers, resulting in inefficient data processing.
By listening to the data incoming, identifying the data type, determining the target data processing unit, obtaining its physical address, and distributing the data to the corresponding unit for processing, thereby realizing distributed processing.
It reduces congestion and delay in data processing, improves data processing efficiency, and is suitable for distributed data processing systems for electronic devices and servers.
Smart Images

Figure CN111796916B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of electronic technology, and in particular to a data distribution method, device, storage medium and server. Background Art
[0002] With the development of electronic technology, electronic devices such as smart phones can provide more and more services to users. For example, electronic devices can provide users with social services, navigation services, travel recommendation services, etc. The more services provided by electronic devices, the greater the amount of data that needs to be processed. Even many services need to rely on servers to uniformly process large amounts of data. Summary of the invention
[0003] The embodiments of the present application provide a data distribution method, device, storage medium and server, which can improve the data processing efficiency of the server.
[0004] The present application provides a data distribution method, including:
[0005] When data is intercepted, the data type of the data is identified;
[0006] Determine a target data processing unit according to the data type, the target data processing unit being used to process the data;
[0007] Obtaining the physical address of the target data processing unit;
[0008] The data is distributed to the target data processing unit according to the physical address.
[0009] The present application also provides a data distribution device, including:
[0010] An identification module, used for identifying the data type of the data when the data is intercepted;
[0011] A determination module, used to determine a target data processing unit according to the data type, and the target data processing unit is used to process the data;
[0012] An acquisition module, used for acquiring the physical address of the target data processing unit;
[0013] A distribution module is used to distribute the data to the target data processing unit according to the physical address.
[0014] An embodiment of the present application further provides a storage medium, wherein a computer program is stored in the storage medium. When the computer program is executed on a computer, the computer is enabled to execute the above-mentioned data distribution method.
[0015] An embodiment of the present application further provides a server, including a processor and a memory, wherein the memory stores a computer program, and the processor is used to execute the above-mentioned data distribution method by calling the computer program stored in the memory.
[0016] The present application also provides a server, including:
[0017] Data scheduling unit, used for:
[0018] When data is intercepted, the data type of the data is identified;
[0019] Determine a target data processing unit according to the data type, the target data processing unit being used to process the data;
[0020] Obtaining the physical address of the target data processing unit;
[0021] A data distribution unit is communicatively connected to the data scheduling unit, and the data distribution unit is used to:
[0022] The data is distributed to the target data processing unit according to the physical address.
[0023] The data distribution method provided by the embodiment of the present application includes: when data is monitored, identifying the data type of the data; determining the target data processing unit according to the data type, the target data processing unit is used to process the data; obtaining the physical address of the target data processing unit; and distributing the data to the target data processing unit according to the physical address. In the data distribution method, when the server monitors the data incoming, the data can be distributed to different target processing units according to the different types of data, thereby realizing distributed processing of large amounts of data, reducing congestion and delay in data processing, and thus improving the efficiency of data processing. BRIEF DESCRIPTION OF THE DRAWINGS
[0024] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present application, and those skilled in the art can obtain other drawings based on these drawings without creative work.
[0025] Figure 1 Schematic diagram of a panoramic perception architecture in an electronic device according to an embodiment of the present application.
[0026] Figure 2 A schematic diagram of the structure of a distributed data processing system according to an embodiment of the present application.
[0027] Figure 3 A first flow chart of a data distribution method provided in an embodiment of the present application.
[0028] Figure 4 A second flow chart of the data distribution method provided in an embodiment of the present application.
[0029] Figure 5 A third flow chart of the data distribution method provided in an embodiment of the present application.
[0030] Figure 6 A fourth flow chart of the data distribution method provided in an embodiment of the present application.
[0031] Figure 7 A schematic diagram of the structure of a data distribution device provided in an embodiment of the present application.
[0032] Figure 8 A schematic diagram of the structure of a server provided in an embodiment of the present application. DETAILED DESCRIPTION
[0033] The technical solutions in the embodiments of the present application will be described clearly and completely below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, rather than all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present application.
[0034] refer to Figure 1 , Figure 1 Schematic diagram of a panoramic perception architecture in an electronic device according to an embodiment of the present application. The panoramic perception architecture is an integration of hardware and software in an electronic device. The panoramic perception architecture can be used to collect panoramic data of the electronic device.
[0035] Among them, the electronic device can be a smart phone, a tablet computer, a gaming device, an AR (Augmented Reality) device, a car, a data storage device, an audio playback device, a video playback device, a laptop computer, a desktop computing device, a wearable device such as an electronic watch, an electronic glasses, an electronic helmet, an electronic bracelet, an electronic necklace, electronic clothing and other devices.
[0036] Among them, the panoramic perception architecture includes information perception layer, data processing layer, feature extraction layer, scenario modeling layer and intelligent service layer.
[0037] The information perception layer is used to obtain information about the electronic device itself or information in the external environment. The information perception layer may include multiple sensors. For example, the information perception layer includes multiple sensors such as distance sensors, magnetic field sensors, light sensors, acceleration sensors, fingerprint sensors, Hall sensors, position sensors, gyroscopes, inertial sensors, attitude sensors, barometers, heart rate sensors, etc.
[0038] Among them, the distance sensor can be used to detect the distance between the electronic device and the external object. The magnetic field sensor can be used to detect the magnetic field information of the environment in which the electronic device is located. The light sensor can be used to detect the light information of the environment in which the electronic device is located. The acceleration sensor can be used to detect the acceleration data of the electronic device. The fingerprint sensor can be used to collect the fingerprint information of the user. The Hall sensor is a magnetic field sensor made according to the Hall effect, which can be used to realize the automatic control of the electronic device. The position sensor can be used to detect the current geographical location of the electronic device. The gyroscope can be used to detect the angular velocity of the electronic device in all directions. The inertial sensor can be used to detect the motion data of the electronic device. The attitude sensor can be used to sense the attitude information of the electronic device. The barometer can be used to detect the air pressure of the environment in which the electronic device is located. The heart rate sensor can be used to detect the heart rate information of the user.
[0039] The data processing layer is used to process the data obtained by the information perception layer. For example, the data processing layer can perform data cleaning, data integration, data transformation, data reduction, etc. on the data obtained by the information perception layer.
[0040] Among them, data cleaning refers to cleaning the large amount of data obtained by the information perception layer to eliminate invalid data and duplicate data. Data integration refers to integrating multiple single-dimensional data obtained by the information perception layer into a higher or more abstract dimension to comprehensively process multiple single-dimensional data. Data transformation refers to converting the data type or format of the data obtained by the information perception layer so that the transformed data meets the processing requirements. Data reduction refers to maximizing the reduction of data volume while keeping the original appearance of the data as much as possible.
[0041] The feature extraction layer is used to extract features from the data processed by the data processing layer to extract features included in the data. The extracted features can reflect the state of the electronic device itself, the state of the user, or the environmental state of the environment in which the electronic device is located.
[0042] Among them, the feature extraction layer can extract features or process the extracted features through filtering, packaging, integration and other methods.
[0043] The filtering method refers to filtering the extracted features to delete redundant feature data. The packaging method is used to screen the extracted features. The integration method refers to integrating multiple feature extraction methods together to build a more efficient and accurate feature extraction method for extracting features.
[0044] The scenario modeling layer is used to construct a model based on the features extracted by the feature extraction layer, and the obtained model can be used to represent the state of the electronic device, the state of the user, or the state of the environment, etc. For example, the scenario modeling layer can construct a key value model, a pattern identification model, a graph model, an entity relationship model, an object-oriented model, etc. based on the features extracted by the feature extraction layer.
[0045] The intelligent service layer is used to provide intelligent services to users based on the model constructed by the scenario modeling layer. For example, the intelligent service layer can provide basic application services to users, perform system intelligent optimization for electronic devices, and provide personalized intelligent services to users.
[0046] In addition, the panoramic perception architecture may also include multiple algorithms, each of which can be used to analyze and process data, and the multiple algorithms may constitute an algorithm library. For example, the algorithm library may include Markov algorithm, implicit Dirichlet distribution algorithm, Bayesian classification algorithm, support vector machine classification algorithm, K-means clustering algorithm, K-nearest neighbor algorithm, conditional random field, residual network, long short-term memory network, convolutional neural network, recurrent neural network and other algorithms.
[0047] The embodiment of the present application provides a data distribution method. The data distribution method can be applied to a distributed data processing system. The execution subject of the data distribution method can be a server in the distributed data processing system, one or more sub-servers in the server, one or more units in the server, one or more modules in the server, etc.
[0048] refer to Figure 2 , Figure 2 A schematic diagram of the structure of a distributed data processing system according to an embodiment of the present application.
[0049] The distributed data processing system includes a plurality of electronic devices and a server, wherein the plurality of electronic devices are all in communication connection with the server.
[0050] The server includes a data scheduling unit, an address management unit, a data distribution unit and a data processing unit. The data scheduling unit, the address management unit and the data distribution unit can be one or more, and the data processing unit can be multiple. Figure 2 It is shown that the server includes a data scheduling unit, an address management unit, and a data distribution unit, but the present application is not limited to this.
[0051] Each data scheduling unit is connected in communication with each electronic device, each address management unit, and each data distribution unit, and each data distribution unit is also connected in communication with each data processing unit.
[0052] The electronic device is used to collect panoramic data of the user and upload the collected panoramic data to the data scheduling unit. Alternatively, the electronic device can also process the collected panoramic data and upload the processing result data to the data scheduling unit. The processing performed by the electronic device on the collected panoramic data may include but is not limited to feature extraction, feature calculation, feature conversion, data classification, feature classification, data modeling, feature modeling, etc., and corresponding processing result data is obtained according to different processing.
[0053] It should be noted that each electronic device only needs to upload the collected panoramic data or the processing result data to one data scheduling unit. Different electronic devices can upload the panoramic data or the processing result data to different data scheduling units.
[0054] The panoramic data may include any data in the environment in which the electronic device is located. For example, the panoramic data may include environmental data such as ambient temperature, ambient light intensity, and ambient noise. The panoramic data may also include operating data of the electronic device such as image data on the electronic device, memory data, and text data displayed on the electronic device. The panoramic data may also include user behavior habit data, such as the user's work and rest time, the user's entertainment activities, etc.
[0055] The data scheduling unit is used to classify the data uploaded by the electronic device, obtain different types of data, and determine the target data processing unit according to the data type. The data distribution unit is used to distribute the data to the corresponding target data processing unit according to the result determined by the data scheduling unit. The address management unit is used to store and maintain the physical addresses of the multiple data processing units so that the data scheduling unit can query the physical addresses of the data processing units.
[0056] It should be noted that the data scheduling unit, address management unit, data distribution unit, and data processing unit may be different functional modules arranged on the same server, or may be sub-servers arranged independently of each other. Among them, the data scheduling unit, address management unit, and data distribution unit may include a large number of functional modules to form a functional module cluster. For example, the data scheduling unit may include a large number of memory-level-based functional modules to form a data scheduling unit cluster. The data distribution unit may also include a large number of memory-level-based functional modules to form a data distribution unit cluster.
[0057] refer to Figure 3 , Figure 3 The first flow chart of the data distribution method provided in the embodiment of the present application is shown below. The data distribution method is described below with the execution subject of the data distribution method being a server.
[0058] The data distribution method comprises the following steps:
[0059] 110. When incoming data is monitored, identify the data type of the data.
[0060] The server may be provided with a monitoring module, which is used to monitor the event of data input from the electronic device. When the monitoring module monitors the event of data input from the electronic device, the server is triggered to start executing the process of the method.
[0061] When data from an electronic device is intercepted, the server first identifies the data type of the data. The data type can be divided according to the purpose of the data, for example, the data type can include image data, audio data, text data, user habit data, etc. The data type can also be divided according to the way the data is generated, for example, the data type can include gravity sensor data, temperature sensor data, light sensor data, display screen data, speaker data, microphone data, processor data, etc. The data type can also be divided according to the degree of data processing by the electronic device, for example, the data type can include raw data, feature data, feature conversion data, model data, model parameter data, etc.
[0062] For example, the data uploaded by the electronic device to the server may include data content and a data type corresponding to the data content. The data content is the data to be processed, for example, the data content may be the original panoramic data collected by the electronic device, or the features extracted from the panoramic data by the electronic device. The data type is the type to which the data content belongs, for example, the data type may be microphone data.
[0063] After the electronic device transmits the data to the server, the server can identify the data according to the type of data carried in the data to obtain the data type of the data.
[0064] The above step 110, when data is monitored to be incoming, identifying the data type of the data, may be executed by a data scheduling unit in the server.
[0065] 120. Determine a target data processing unit according to the data type, wherein the target data processing unit is used to process the data.
[0066] The server is provided with a plurality of data processing units, wherein each of the data processing units is used to process a type of data.
[0067] After the server identifies the data type of the data, it can determine a target data processing unit from the multiple data processing units according to the data type, wherein the target data processing unit is used to process the data.
[0068] For example, the data type identified by the server is microphone data. The server is provided with five data processing units, namely, M1, M2, M3, M4, and M5. Among them, the data processing unit M3 is used to process the microphone data. Then, the server can determine the data processing unit M3 as the target data processing unit.
[0069] Among them, the above step 120, determining the target data processing unit according to the data type, the target data processing unit is used to process the data, and can also be executed by the data scheduling unit in the server.
[0070] 130. Obtain the physical address of the target data processing unit.
[0071] After the server determines the target data processing unit, it can obtain the physical address of the target data processing unit. The physical address is used to indicate the location of the target data processing unit on the server.
[0072] For example, the physical address may be a media access control address (MAC) of the target data processing unit, or a memory address of the target data processing unit on the server.
[0073] The above step 130, obtaining the physical address of the target data processing unit, may also be performed by the data scheduling unit in the server.
[0074] 140. Distribute the data to the target data processing unit according to the physical address.
[0075] After the server obtains the physical address of the target data processing unit, it can distribute the data to the target data processing unit according to the physical address. Then, the target data processing unit can process the data.
[0076] The above step 140, distributing the data to the target data processing unit according to the physical address, may be executed by a data distribution unit in the server.
[0077] The data distribution method provided in the embodiment of the present application can distribute the data to different target processing units according to the different types of data when the server monitors the incoming data, thereby realizing distributed processing of large amounts of data, reducing congestion and delay in data processing, and thus improving the efficiency of data processing.
[0078] In some embodiments, reference Figure 4 , Figure 4 A second flow chart of the data distribution method provided in an embodiment of the present application.
[0079] The data includes data content and a first data type corresponding to the data content. Step 110, when data is intercepted, identifying the data type of the data, includes the following steps:
[0080] 111, when data is intercepted, classify and calculate the data content according to a preset classification algorithm to obtain a second data type to which the data content belongs;
[0081] 112, determining whether the second data type is the same as the first data type;
[0082] 113. If the second data type is the same as the first data type, determine the first data type or the second data type as the data type of the data.
[0083] The data transmitted from the electronic device to the server includes data content and a first data type corresponding to the data content. The first data type is the type to which the data content belongs, for example, the first data type may be microphone data.
[0084] In actual applications, when an electronic device uploads data to a server, data packet loss or transmission errors may occur during the data upload process, resulting in inconsistency between the data received by the server and the data uploaded by the electronic device. Therefore, after receiving the data transmitted by the electronic device, the server needs to verify the data type of the data.
[0085] When data is intercepted, the server may classify and calculate the data content in the data according to a preset classification algorithm to obtain the second data type to which the data content belongs.
[0086] The preset classification algorithm may be a pre-set algorithm, for example, the preset classification algorithm may be a Bayesian classification algorithm, a support vector machine classification algorithm, etc. The server may pre-train a classification model according to the preset classification algorithm. When performing classification calculation on the data content, the classification model may be used for calculation. The result of the classification calculation is the data type to which the data content belongs, that is, the second data type.
[0087] Subsequently, the server compares the obtained second data type with the first data type to determine whether the second data type is the same as the first data type. If the second data type is the same as the first data type, the server determines the first data type or the second data type as the data type of the data. If the second data type is different from the first data type, it means that the data received by the server is inconsistent with the data uploaded by the electronic device, and the server can terminate the process.
[0088] For example, if the first data type in the data uploaded by the electronic device is microphone data, and the second data type obtained by classification and calculation by the server is also microphone data, then the second data type is the same as the first data type. At this time, the server can determine the microphone data as the data type of the data.
[0089] In some embodiments, reference Figure 5 , Figure 5 A third flow chart of the data distribution method provided in an embodiment of the present application.
[0090] Among them, step 111, when data is monitored, classifying and calculating the data content according to a preset classification algorithm to obtain the second data type to which the data content belongs, includes the following steps:
[0091] 1111, extracting multiple features of the data according to the data content;
[0092] 1112, constructing a feature vector of the data according to the multiple features;
[0093] 1113. Classify and calculate the feature vector according to a preset classification algorithm to obtain a second data type to which the data belongs.
[0094] After receiving the data transmitted by the electronic device, the server can extract multiple features of the data according to the data content of the data, and construct a feature vector of the data according to the multiple features.
[0095] For different data, the extracted features may be different, the number of extracted features may be different, and thus the constructed feature vectors may be different. For example, for microphone data, the features extracted by the server may include the time when the data was collected, the duration of the data, the volume of the audio data, the timbre of the audio data, and other features, and the feature vector is constructed based on the multiple features.
[0096] Subsequently, the server classifies and calculates the feature vector according to a preset classification algorithm to obtain the second data type to which the data belongs. For example, after the server constructs and obtains the feature vector, it can classify and calculate the feature vector according to a support vector machine classification algorithm to obtain the second data type to which the data belongs.
[0097] In some embodiments, reference Figure 6 , Figure 6 A fourth flow chart of the data distribution method provided in an embodiment of the present application.
[0098] Wherein, step 120, determining the target data processing unit according to the data type, includes the following steps:
[0099] 121, sequentially comparing the data type with a type of data processed by each of a plurality of data processing units, wherein each of the data processing units is used to process one type of data;
[0100] 122. Determine a data processing unit among the multiple data processing units, the data type of which is the same as the data type, as a target data processing unit.
[0101] The server is provided with a plurality of data processing units, each of which is used to process a type of data. For example, the server is provided with five data processing units, namely, M1, M2, M3, M4, and M5. The data processing unit M1 is used to process the gravity sensor data, the data processing unit M2 is used to process the temperature sensor data, the data processing unit M3 is used to process the microphone data, the data processing unit M4 is used to process the light sensor data, and the data processing unit M5 is used to process the display screen data.
[0102] After the server identifies the data type of the data, it can sequentially compare the data type with the type of data processed by each of the multiple data processing units, and then determine the data processing unit among the multiple data processing units whose data type is the same as the identified data type as the target data processing unit.
[0103] For example, if the data type identified by the server is microphone data, the server can sequentially compare the microphone data with the types of data processed by the data processing units M1, M2, M3, M4, and M5. Subsequently, the server can determine the data processing unit M3 that processes the microphone data as the target data processing unit.
[0104] In some embodiments, continue to refer to Figure 6 , wherein step 130, obtaining the physical address of the target data processing unit, comprises the following steps:
[0105] 131. Search for the physical address of the target data processing unit according to a preset mapping relationship table, wherein the preset mapping relationship table includes a correspondence between data processing units and physical addresses.
[0106] The server may pre-store the physical address of each data processing unit to form a preset mapping relationship table between the data processing unit and the physical address. The preset mapping relationship table includes a one-to-one correspondence between the data processing unit and the physical address.
[0107] After determining the target data processing unit, the server can search the preset mapping relationship table to obtain the physical address of the target data processing unit.
[0108] In the description of this application, it should be understood that terms such as "first" and "second" are only used to distinguish similar objects and cannot be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features.
[0109] In specific implementation, the present application is not limited by the execution order of the various steps described. If no conflict occurs, some steps can be performed in other orders or simultaneously.
[0110] As can be seen from the above, the data distribution method provided by the embodiment of the present application includes: when data is monitored, the data type of the data is identified; according to the data type, a target data processing unit is determined, and the target data processing unit is used to process the data; the physical address of the target data processing unit is obtained; and the data is distributed to the target data processing unit according to the physical address. In the data distribution method, when the server monitors the data incoming, the data can be distributed to different target processing units according to the different types of data, thereby realizing the distributed processing of a large amount of data, reducing the congestion and delay in data processing, and thus improving the efficiency of data processing.
[0111] An embodiment of the present application also provides a data distribution device, which can be integrated in a server, or in a sub-server or functional module of the server.
[0112] refer to Figure 7 , Figure 7 A schematic diagram of the structure of a data distribution device provided in an embodiment of the present application.
[0113] The data distribution device 200 includes: an identification module 201 , a determination module 202 , an acquisition module 203 , and a distribution module 204 .
[0114] The identification module 201 is used to identify the data type of the data when data is monitored.
[0115] The server may be provided with a monitoring module, which is used to monitor the event of data input from the electronic device. When the monitoring module monitors the event of data input from the electronic device, the server is triggered to start executing the process of the method.
[0116] When data from an electronic device is intercepted, the identification module 201 first identifies the data type of the data. The data type can be divided according to the purpose of the data, for example, the data type can include image data, audio data, text data, user habit data, etc. The data type can also be divided according to the way the data is generated, for example, the data type can include gravity sensor data, temperature sensor data, light sensor data, display screen data, speaker data, microphone data, processor data, etc. The data type can also be divided according to the degree of data processing by the electronic device, for example, the data type can include raw data, feature data, feature conversion data, model data, model parameter data, etc.
[0117] For example, the data uploaded by the electronic device to the server may include data content and a data type corresponding to the data content. The data content is the data to be processed, for example, the data content may be the original panoramic data collected by the electronic device, or the features extracted from the panoramic data by the electronic device. The data type is the type to which the data content belongs, for example, the data type may be microphone data.
[0118] After the electronic device transmits the data to the server, the identification module 201 can identify the data according to the data type carried in the data to obtain the data type of the data.
[0119] The determination module 202 is used to determine a target data processing unit according to the data type, and the target data processing unit is used to process the data.
[0120] The server is provided with a plurality of data processing units, wherein each of the data processing units is used to process a type of data.
[0121] After the identification module 201 identifies the data type of the data, the determination module 202 can determine a target data processing unit from the multiple data processing units according to the data type, wherein the target data processing unit is used to process the data.
[0122] For example, the data type identified by the identification module 201 is microphone data. The server is provided with five data processing units, namely, M1, M2, M3, M4, and M5. Among them, the data processing unit M3 is used to process the microphone data. Then, the determination module 202 can determine the data processing unit M3 as the target data processing unit.
[0123] The acquisition module 203 is used to acquire the physical address of the target data processing unit.
[0124] After the determination module 202 determines the target data processing unit, the acquisition module 203 can acquire the physical address of the target data processing unit. The physical address is used to indicate the location of the target data processing unit on the server.
[0125] For example, the physical address may be a media access control address (MAC) of the target data processing unit, or a memory address of the target data processing unit on the server.
[0126] The distribution module 204 is used to distribute the data to the target data processing unit according to the physical address.
[0127] After the acquisition module 203 acquires the physical address of the target data processing unit, the distribution module 204 can distribute the data to the target data processing unit according to the physical address. Then, the target data processing unit can process the data.
[0128] The data distribution device provided in the embodiment of the present application can distribute the data to different target processing units according to the different types of data when it monitors the incoming data, thereby realizing distributed processing of large amounts of data, reducing congestion and delay in data processing, and thus improving the efficiency of data processing.
[0129] In some embodiments, the data includes data content and a first data type corresponding to the data content. The identification module 201 is used to perform the following steps:
[0130] When data is intercepted, the data content is classified and calculated according to a preset classification algorithm to obtain a second data type to which the data content belongs;
[0131] Determine whether the second data type is the same as the first data type;
[0132] If the second data type is the same as the first data type, the first data type or the second data type is determined as the data type of the data.
[0133] The data transmitted from the electronic device to the server includes data content and a first data type corresponding to the data content. The first data type is the type to which the data content belongs, for example, the first data type may be microphone data.
[0134] In actual applications, when an electronic device uploads data to a server, data packet loss or transmission errors may occur during the data upload process, resulting in inconsistency between the data received by the server and the data uploaded by the electronic device. Therefore, after receiving the data transmitted by the electronic device, the server needs to verify the data type of the data.
[0135] When data is intercepted, the identification module 201 may classify and calculate the data content in the data according to a preset classification algorithm to obtain the second data type to which the data content belongs.
[0136] The preset classification algorithm may be a pre-set algorithm, for example, the preset classification algorithm may be a Bayesian classification algorithm, a support vector machine classification algorithm, etc. The recognition module 201 may be trained in advance according to the preset classification algorithm to obtain a classification model. When performing classification calculation on the data content, the classification model may be used for calculation. The result of the classification calculation is the data type to which the data content belongs, that is, the second data type.
[0137] Subsequently, the identification module 201 compares the obtained second data type with the first data type to determine whether the second data type is the same as the first data type. If the second data type is the same as the first data type, the identification module 201 determines the first data type or the second data type as the data type of the data. If the second data type is not the same as the first data type, it means that the data received by the server is inconsistent with the data uploaded by the electronic device, and the server can terminate the process.
[0138] For example, if the first data type in the data uploaded by the electronic device is microphone data, and the second data type classified and calculated by the identification module 201 is also microphone data, then the second data type is the same as the first data type. At this time, the identification module 201 can determine the microphone data as the data type of the data.
[0139] In some embodiments, when data is intercepted, the data content is classified and calculated according to a preset classification algorithm to obtain the second data type to which the data content belongs, and the identification module 201 is used to perform the following steps:
[0140] Extracting a plurality of features of the data according to the data content;
[0141] constructing a feature vector of the data according to the multiple features;
[0142] The feature vector is classified and calculated according to a preset classification algorithm to obtain a second data type to which the data belongs.
[0143] After the server receives the data transmitted by the electronic device, the identification module 201 may extract multiple features of the data according to the data content of the data, and construct a feature vector of the data according to the multiple features.
[0144] For different data, the extracted features may be different, the number of extracted features may be different, and thus the constructed feature vectors may be different. For example, for microphone data, the features extracted by the recognition module 201 may include multiple features such as the time of data collection, the duration of the data, the volume of the audio data, the timbre of the audio data, and the like, and a feature vector may be constructed based on the multiple features.
[0145] Subsequently, the recognition module 201 classifies and calculates the feature vector according to a preset classification algorithm to obtain the second data type to which the data belongs. For example, after the recognition module 201 constructs and obtains the feature vector, it can classify and calculate the feature vector according to a support vector machine classification algorithm to obtain the second data type to which the data belongs.
[0146] In some embodiments, the determination module 202 is configured to perform the following steps:
[0147] sequentially comparing the data type with the type of data processed by each of a plurality of data processing units, wherein each of the data processing units is configured to process one type of data;
[0148] A data processing unit among the plurality of data processing units, which processes data of the same type as the data type, is determined as a target data processing unit.
[0149] The server is provided with a plurality of data processing units, each of which is used to process a type of data. For example, the server is provided with five data processing units, namely, M1, M2, M3, M4, and M5. The data processing unit M1 is used to process the gravity sensor data, the data processing unit M2 is used to process the temperature sensor data, the data processing unit M3 is used to process the microphone data, the data processing unit M4 is used to process the light sensor data, and the data processing unit M5 is used to process the display screen data.
[0150] After the identification module 201 identifies the data type of the data, the determination module 202 may sequentially compare the data type with the type of data processed by each of the multiple data processing units. Subsequently, the data processing unit that processes the same type of data as the identified data type among the multiple data processing units is determined as the target data processing unit.
[0151] For example, if the data type identified by the recognition module 201 is microphone data, the determination module 202 can sequentially compare the microphone data with the types of data processed by the data processing units M1, M2, M3, M4, and M5. Subsequently, the determination module 202 can determine the data processing unit M3 that processes the microphone data as the target data processing unit.
[0152] In some embodiments, the acquisition module 203 is used to perform the following steps:
[0153] The physical address of the target data processing unit is searched according to a preset mapping relationship table, wherein the preset mapping relationship table includes a correspondence between data processing units and physical addresses.
[0154] The server may pre-store the physical address of each data processing unit to form a preset mapping relationship table between the data processing unit and the physical address. The preset mapping relationship table includes a one-to-one correspondence between the data processing unit and the physical address.
[0155] After the determination module 202 determines the target data processing unit, the acquisition module 203 can search the preset mapping relationship table to obtain the physical address of the target data processing unit.
[0156] In specific implementation, the above modules can be implemented as independent entities, or can be arbitrarily combined to be implemented as the same entity or several entities.
[0157] As can be seen from the above, the data distribution device 200 provided in the embodiment of the present application includes: an identification module 201, which is used to identify the data type of the data when data is monitored; a determination module 202, which is used to determine the target data processing unit according to the data type, and the target data processing unit is used to process the data; an acquisition module 203, which is used to obtain the physical address of the target data processing unit; and a distribution module 204, which is used to distribute the data to the target data processing unit according to the physical address. In the data distribution device, when data is monitored, the data can be distributed to different target processing units according to different types of data, thereby realizing distributed processing of a large amount of data, reducing congestion and delay in data processing, and thus improving the efficiency of data processing.
[0158] The present application also provides a server. Figure 8 , Figure 8 A first structural diagram of a server provided in an embodiment of the present application.
[0159] The server 300 includes a processor 301 and a memory 302. The processor 301 is electrically connected to the memory 302.
[0160] Processor 301 is the control center of server 300. It uses various interfaces and lines to connect various parts of the entire server, and executes various functions and processes data by running or calling computer programs stored in memory 302, and calling data stored in memory 302, thereby monitoring the server as a whole.
[0161] In this embodiment, the processor 301 in the server 300 will load instructions corresponding to the processes of one or more computer programs into the memory 302 according to the following steps, and the processor 301 will run the computer program stored in the memory 302, thereby performing the following steps:
[0162] When data is intercepted, the data type of the data is identified;
[0163] Determine a target data processing unit according to the data type, the target data processing unit being used to process the data;
[0164] Obtaining the physical address of the target data processing unit;
[0165] The data is distributed to the target data processing unit according to the physical address.
[0166] In some embodiments, the data includes data content and a first data type corresponding to the data content. When identifying the data type of the data, the processor 301 performs the following steps:
[0167] Classify and calculate the data content according to a preset classification algorithm to obtain a second data type to which the data content belongs;
[0168] Determine whether the second data type is the same as the first data type;
[0169] If the second data type is the same as the first data type, the first data type or the second data type is determined as the data type of the data.
[0170] In some embodiments, when the data content is classified and calculated according to a preset classification algorithm to obtain the second data type to which the data content belongs, the processor 301 performs the following steps:
[0171] Extracting a plurality of features of the data according to the data content;
[0172] constructing a feature vector of the data according to the multiple features;
[0173] The feature vector is classified and calculated according to a preset classification algorithm to obtain a second data type to which the data belongs.
[0174] In some embodiments, when determining the target data processing unit according to the data type, the processor 301 performs the following steps:
[0175] sequentially comparing the data type with the type of data processed by each of a plurality of data processing units, wherein each of the data processing units is configured to process one type of data;
[0176] A data processing unit among the plurality of data processing units, which processes data of the same type as the data type, is determined as a target data processing unit.
[0177] In some embodiments, when obtaining the physical address of the target data processing unit, the processor 301 performs the following steps:
[0178] The physical address of the target data processing unit is searched according to a preset mapping relationship table, wherein the preset mapping relationship table includes a correspondence between data processing units and physical addresses.
[0179] The memory 302 can be used to store computer programs and data. The computer programs stored in the memory 302 contain instructions that can be executed in the processor. The computer programs can form various functional modules. The processor 301 executes various functional applications and data processing by calling the computer programs stored in the memory 302.
[0180] although Figure 8Not shown, the server 300 may also include a control circuit, an input / output circuit, etc., which will not be described in detail here.
[0181] As can be seen from the above, an embodiment of the present application provides a server, which performs the following steps: when data is monitored, the data type of the data is identified; according to the data type, a target data processing unit is determined, and the target data processing unit is used to process the data; the physical address of the target data processing unit is obtained; and the data is distributed to the target data processing unit according to the physical address. In the server, when data is monitored, the data can be distributed to different target processing units according to the different types of data, thereby realizing distributed processing of large amounts of data, reducing congestion and delay in data processing, and thus improving the efficiency of data processing.
[0182] An embodiment of the present application further provides a storage medium, in which a computer program is stored. When the computer program runs on a computer, the computer executes the data distribution method described in any of the above embodiments.
[0183] It should be noted that, a person skilled in the art can understand that all or part of the steps in the various methods of the above embodiments can be completed by instructing related hardware through a computer program, and the computer program can be stored in a computer-readable storage medium, and the storage medium can include but is not limited to: read-only memory (ROM), random access memory (RAM), disk or optical disk, etc.
[0184] The above is a detailed introduction to the data distribution method, device, storage medium and server provided in the embodiments of the present application. Specific examples are used herein to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the method and core idea of the present application. At the same time, for those skilled in the art, according to the idea of the present application, there will be changes in the specific implementation method and application scope. In summary, the content of this specification should not be understood as a limitation on the present application.
Claims
1. A data distribution method, characterized in that: include: When data incoming is monitored, the data includes data content and a first data type corresponding to the data content, and the data type of the data is identified; Classify and calculate the data content according to a preset classification algorithm to obtain a second data type to which the data content belongs; Determine whether the second data type is the same as the first data type; If the second data type is the same as the first data type, determining the first data type or the second data type as the data type of the data; Determine a target data processing unit according to the data type, the target data processing unit being used to process the data; Obtaining the physical address of the target data processing unit; The data is distributed to the target data processing unit according to the physical address.
2. The data distribution method according to claim 1, characterized in that: The classifying and calculating the data content according to a preset classification algorithm to obtain the second data type to which the data content belongs includes: Extracting a plurality of features of the data according to the data content; constructing a feature vector of the data according to the multiple features; The feature vector is classified and calculated according to a preset classification algorithm to obtain a second data type to which the data belongs.
3. The data distribution method according to any one of claims 1 to 2, characterized in that: The step of determining the target data processing unit according to the data type comprises: sequentially comparing the data type with the type of data processed by each of a plurality of data processing units, wherein each of the data processing units is configured to process one type of data; A data processing unit among the plurality of data processing units, which processes data of the same type as the data type, is determined as a target data processing unit.
4. The data distribution method according to any one of claims 1 to 2, characterized in that: The step of obtaining the physical address of the target data processing unit comprises: The physical address of the target data processing unit is searched according to a preset mapping relationship table, wherein the preset mapping relationship table includes a correspondence between data processing units and physical addresses.
5. A data distribution device, characterized in that: include: an identification module, configured to identify the data type of the data when data is intercepted, wherein the data includes data content and a first data type corresponding to the data content, When identifying the data type of the data, the identification module is used to: Classify and calculate the data content according to a preset classification algorithm to obtain a second data type to which the data content belongs; Determine whether the second data type is the same as the first data type; If the second data type is the same as the first data type, determining the first data type or the second data type as the data type of the data; A determination module, used to determine a target data processing unit according to the data type, and the target data processing unit is used to process the data; An acquisition module, used for acquiring the physical address of the target data processing unit; A distribution module is used to distribute the data to the target data processing unit according to the physical address.
6. The data distribution device according to claim 5, characterized in that: When classifying and calculating the data content according to a preset classification algorithm to obtain a second data type to which the data content belongs, the identification module is used to: Extracting a plurality of features of the data according to the data content; constructing a feature vector of the data according to the multiple features; The feature vector is classified and calculated according to a preset classification algorithm to obtain a second data type to which the data belongs.
7. A storage medium, characterized in that: The storage medium stores a computer program, and when the computer program is executed on a computer, the computer is caused to execute the data distribution method according to any one of claims 1 to 4.
8. A server, characterized in that: The server includes a processor and a memory, wherein a computer program is stored in the memory, and the processor is used to execute the data distribution method according to any one of claims 1 to 4 by calling the computer program stored in the memory.
9. A server, characterized in that: include: Data scheduling unit, used for: When data incoming is monitored, the data includes data content and a first data type corresponding to the data content, and the data type of the data is identified; Classify and calculate the data content according to a preset classification algorithm to obtain a second data type to which the data content belongs; Determine whether the second data type is the same as the first data type; If the second data type is the same as the first data type, determining the first data type or the second data type as the data type of the data; Determine a target data processing unit according to the data type, the target data processing unit being used to process the data; Obtaining the physical address of the target data processing unit; A data distribution unit is communicatively connected to the data scheduling unit, and the data distribution unit is used to: The data is distributed to the target data processing unit according to the physical address.
