Detailed Description
The embodiment of the application provides a data sharing method and system for a smart city, solves the problem of low data sharing efficiency in the prior art, realizes classified sharing of data, improves sharing efficiency, and effectively integrates the technical effects of scattered data. Hereinafter, example embodiments according to the present application will be described in detail with reference to the accompanying drawings. It should be apparent that the described embodiments are merely some embodiments of the present application and not all embodiments of the present application, and it should be understood that the present application is not limited to the example embodiments described herein.
Summary of the application
With the continuous progress of science and technology, cities develop rapidly, and smart cities gradually begin to go into our lives. The system and service of the city are communicated and integrated, the efficiency of resource application is improved, city management and service are optimized, and the quality of life of citizens is improved. However, the smart city needs to rely on a large amount of basic data as support, the basic data is huge and complicated, and the data sharing efficiency is low.
In view of the above technical problems, the technical solution provided by the present application has the following general idea:
a data sharing method for a smart city, wherein the method comprises: obtaining format information of first data; obtaining content information of the first data; inputting format information and the content information of the first data into a training model, wherein the training model is obtained by training a plurality of groups of training data, and each group of training data in the plurality of groups comprises: format information and the content information of the first data and identification information for identifying the first data category; obtaining output information of the training model, wherein the output information comprises category information of the first data; and performing data sharing on the first data of different categories through different sharing channels.
Having thus described the general principles of the present application, various non-limiting embodiments thereof will now be described in detail with reference to the accompanying drawings.
Example one
As shown in fig. one, the present application provides a data sharing method for a smart city, wherein the method includes:
step S100: obtaining format information of first data;
specifically, the first data is specific basic data information in the smart city system, such as traffic information, various pipeline information, building information, merchant information, and the like, which is not limited herein. The format information of the first data may be embodied in a picture format, a text format, an audio format, a video format, and the like. After the first data is obtained, the format information of the first data is obtained, and the first data is subjected to primary classification according to the format information of the first data, so that the data processing efficiency is improved, and the effect of improving the data sharing efficiency is further achieved.
Step S200: obtaining content information of the first data;
specifically, the content information of the first data may specifically identify that the first data represents identity information, location information, quantity information, and the like. After the first data is acquired, the acquisition mode of the content information is judged according to the format information of the first data, and the content information is further acquired. According to the content information of the first data, the first data are further classified, the data processing efficiency is improved, and the effect of improving the data sharing efficiency is achieved.
Step S300: inputting format information and the content information of the first data into a training model, wherein the training model is obtained by training a plurality of groups of training data, and each group of training data in the plurality of groups comprises: format information and the content information of the first data and identification information for identifying the first data category;
specifically, the training model is a neural network model, and the neural network model can continuously learn through a large amount of data, further continuously correct the model, and finally obtain satisfactory experience to process other data.
Further, the neural network model is obtained through training of multiple sets of training data. The plurality of groups of training data are specifically: format information of the first data, content information of the first data, and category information for identifying the first data. The neural network model outputs first data category information by inputting format information and content information of first data, the first data category information output by the neural network model is verified by the identified first data category information, and if the output category information is consistent with the identified category information, the next group of data training learning is carried out; and if the output class information is inconsistent with the identified class information, the neural network model adjusts itself until the neural network model reaches the expected accuracy, and then training and learning of the next group of data are carried out. The accuracy of the neural network model for processing the first data information is improved by continuously correcting the neural network model, so that the classification information is accurate, the data processing efficiency is improved by classifying the first data, and the effect of improving the data sharing efficiency is achieved.
Further, the process by which the neural network model is trained by training data is essentially a process of supervised learning. In detail, the first group of supervised learning data specifically includes: format information of the first data, content information of the first data, category information for identifying the first data. The content information of the first data is obtained by judging the format information of the first data and then using a means corresponding to the format information. When supervised learning is carried out, the format information of the first data and the content information of the first data are input into the neural network model, the neural network model outputs first data category information, the first data category information output by the neural network model is compared with the first data category information identified by the supervised learning, and if the output first data category information is consistent with the identified first data category information, the next group of data is supervised learning; if the output first data category information is inconsistent with the identified first data category information, the neural network model continuously optimizes the neural network model, and the supervised learning process is finished until the output first data category information is consistent with the identified first data category information, so that the supervised learning of the next group of data is carried out. Through carrying out supervised learning to the neural network model for neural network model self is constantly optimized, and then improves the accuracy that the neural network model handled first data information, outputs first data classification information, and then makes categorised information accurate, through carrying out classification to first data, promotes data processing efficiency, and then reaches the effect that improves data sharing efficiency.
Step S400: obtaining output information of the training model, wherein the output information comprises category information of the first data;
specifically, after the first data format information and the content information are input into a training model, the training model outputs an output information, the output information includes category information for classifying the first data, and further, after the format information and the content information of the data information are input into a neural network model, the neural network model classifies the data information, and after the classification is completed, the category information of the data is output. Through carrying out classification processing to first data, promote data processing efficiency, and then reach the effect that improves data sharing efficiency.
Step S500: and performing data sharing on the first data of different categories through different sharing channels.
Specifically, the classification information is output by the neural network model to determine usage information of the first data, and the same number of data sharing channels are matched to the first data according to different usage of the first data. Furthermore, the number of the categories of the first data is obtained according to the usage information of the first data, the same number of shared channels are matched for the first data according to the number of the categories of the first data, and the category information of the first data and the category information of the shared channels are in a one-to-one correspondence relationship. Through the classification processing of the first data information, the first data information is shared through the sharing channel matched with the first data information according to different categories, the effect of classifying and sharing the data is achieved, the scattered data is effectively integrated, and the effect of improving the data sharing efficiency is achieved.
Further, the format information of the data information is jpg, the format information of the obtained first data is jpg format, and the data information is judged to be the image information according to the format information characteristic. Acquiring content information of first data, judging the data to be the characteristics of image information according to the format information, performing feature extraction on the data in a feature extraction mode, and acquiring the content information of the data information: the certificate of a certain resident in the intelligent community is used for obtaining information. Inputting the format information jpg and the certificate photo information of a certain resident in the intelligent community of the content information into a neural network model, and outputting classification information of the resident according to the use of the certificate photo information of the resident in the jpg format by the neural network model, wherein the classification information comprises the following steps: the community safety access information, the unit building door safety access information, the house door safety access information and the parking space use information. And meanwhile, correspondingly, matching the different output classification information: the system comprises a community safety data sharing channel, a unit building door safety data sharing channel, a house door access data sharing channel and a parking space data sharing channel, wherein the data information is shared through the sharing channels.
As shown in fig. two, in order to achieve the effect of accurately determining format information of data, step S100 in the embodiment of the present application further includes:
step S110: obtaining attribute information of the first data;
step S120: performing feature extraction on the attribute information to obtain suffix information of the first data;
step S130: and obtaining format information of the first data according to suffix information of the first data.
Specifically, the obtaining of the data format information may specifically be obtaining attribute information of the first data, obtaining suffix information of the first data according to the attribute information, and determining the format information according to the suffix information specifically as: if the data suffix is doc, the data is text format data; if the first data suffix information is jpg, the data is picture format data; if the first data suffix information is.mp 3, the data is audio format data; if the first data suffix information is mp4, the data is video format data, and the format information of the data is judged through the suffix information of the first data, so that the judgment on the format information of the first data is more accurate, the format classification of the first data is more accurate, and the data processing efficiency is improved.
As shown in fig. three, in order to achieve the effect of accurately obtaining content information of data, step S200 in the embodiment of the present application further includes:
step S210: determining an obtaining mode of the first data content information according to the format information of the first data;
step S220: and acquiring the content information of the first data according to the acquisition mode of the content information of the first data.
Specifically, according to the format information of the first data, such as: text format data, picture format data, audio format data, video format data, etc. to determine the manner in which the first data content is obtained. According to the format of the first data, the content information of the first data is obtained by 'teaching according to the material'. The obtaining mode of obtaining the first data content information is judged according to the format information, so that the efficiency of obtaining the first data content information is improved, the speed of processing the first data is increased, and the effect of improving the efficiency of data sharing is achieved.
Step S230: if the format information of the first data is image information, performing feature extraction on the first data to obtain content information of the first data; and if the format information of the first data is text information, performing semantic recognition on the first data to obtain the content information of the first data.
Specifically, the content information of the first data is obtained not blindly, but by the format information of the first data, it is determined how to obtain the content information of the first data: when the format information of the first data is judged to be image information, acquiring the content information of the first data in a characteristic capture mode; when the format information of the first data is judged to be text information, acquiring the content information of the first data in a semantic recognition mode; and when the format information of the first data is judged to be audio information, acquiring the content information of the first data in a voice recognition mode. The first data acquisition mode is obtained through the first data format information, and then the content information of the first data is acquired in a targeted manner, so that the speed of acquiring the content of the first data information is increased, the speed of processing the first data is increased, and the effect of improving the data sharing efficiency is achieved.
As shown in fig. four, in order to improve the efficiency of outputting information of the training model according to the format information and the content information of the first data, and achieve the effect of improving the data sharing efficiency, step S300 in the embodiment of the present application further includes:
step S310: obtaining data size information of the first data;
step S320: acquiring a first influence parameter according to the data size information;
step S330: the first impact parameter has an impact on a priority of the training model for processing the first data.
Specifically, the size information of the first data is a size of a storage space occupied by the first data. After the format information of the first data is obtained, the limitation that the data information of the high-quality data under different formats occupies different storage space sizes is set according to the difference of the format information, further, the data size information of the first data is obtained, whether the first data is the high-quality data under the formats is judged according to the occupied space size of the first data, and a first influence parameter is obtained and influences the priority of the training model for processing the first data. Further, the method comprises the following steps: acquiring first data, wherein the acquired first data format information is jpg, the content information of the first data format information is a certificate photo of a certain resident, the acquired storage space occupied by the certificate photo is 700KB, the storage space occupied by the jpg format data is in the range of 500KB-1500KB, the jpg format data is high-quality data, the acquired first influence parameter is a, the first influence parameter a is input into the training model, and then the training model judges that the first data is high-quality data and processes the first data preferentially. And when the size of the data is not in the size range of the high-quality data in the format, obtaining a first influence parameter b, inputting the first influence parameter b into a training model, judging the first data as non-high-quality data by the training model, and processing the first data in a delayed manner. The first influence parameter is obtained through the information of the size of the storage space occupied by the first data, so that the mode of processing the priority of the first data by the training model is influenced, the high-quality first data is processed preferentially, the speed of identifying and classifying the first data is accelerated, and the effect of improving the efficiency of data sharing is achieved.
As shown in fig. five, in order to achieve the effects of classifying and sharing the first data and improving the data sharing efficiency, step S400 in the embodiment of the present application further includes:
step S410: obtaining attribute information of the first data;
step S420: acquiring the use information of the first data according to the attribute information of the first data;
step S430: according to the use information, adjusting the category information of the first data to obtain secondary classification information of the first data;
step S440: and according to the secondary classification information, performing data sharing on the first data of different classes through a sharing channel with the same quantity as the secondary classification information.
Specifically, the neural network model secondarily classifies the category information of the first data according to the usage information of the first data: and the purposes a, b and c are used for matching the same number of data sharing channels for different purposes of the first data, namely sharing channels 1, 2 and 3, and the first data of different categories are subjected to data sharing through the sharing channels with the same number as the secondary classification information.
As shown in fig. six, in order to achieve the effect of classifying and sharing the first data through different sharing channels and improving the data sharing efficiency, step S500 in the embodiment of the present application further includes:
step S510: obtaining the category number of the first data according to the category information of the first data;
step S520: obtaining the number of shared channels which is the same as the number of the first data according to the number of the first data;
step S530: and performing data sharing on the first data of different categories through different sharing channels.
Step S540: classifying the shared channel according to the class information of the first data to obtain the class information of the shared channel, wherein the class information of the first data corresponds to the class information of the shared channel;
step S550: matching the first data with the shared channel according to the category information; and carrying out data transmission on the first data through a shared channel matched with the first data.
Specifically, the neural network model secondarily classifies the category information of the first data according to the usage information of the first data: the purpose a, the purpose b and the purpose c are used for matching the same number of data sharing channels, namely a sharing channel 1, a sharing channel 2 and a sharing channel 3, for different purposes of the first data. The first data is matched with the corresponding shared channel according to different purposes, and the data with different purposes are transmitted through the shared channel matched with the first data. Through the means of matching different sharing channels according to different purposes of the data, the effect of classifying and sharing the data is achieved, scattered data is effectively sorted, and the data sharing efficiency is improved.
1. Because the first data format information and the content information are input into the training model, and the training model is used for classifying the first data, the classification information of the first data is more accurate based on the characteristic that the training model can continuously optimize learning and obtain experience to process the data more accurately, and the data processing efficiency is improved by accurately classifying the first data, thereby achieving the effect of improving the data sharing efficiency.
2. Due to the fact that the first influence parameters are obtained according to the data size information to influence the priority of the training model for processing the first data, the effect of conducting priority processing on the first data with high quality is achieved, the speed of recognizing and classifying the first data is increased, and the effect of improving the data sharing efficiency is achieved.
3. The mode of judging how to obtain the first data content information according to the format information of the first data is adopted, so that the effects of rapider and more accurate identification of the first data content are achieved, a foundation is laid for accurate classification and tamping of the first data, the classification information of the first data is more accurate, the data processing efficiency is improved, and the effect of improving the data sharing efficiency is achieved.
4. The data sharing method has the advantages that the classification information of the first data is secondarily classified according to the purpose information of the first data, the first data of different types are shared through the sharing channels with the same number as the secondary classification information in a one-to-one matching mode, the effect of classifying and sharing the data is achieved, scattered data are effectively sorted, and the data sharing efficiency is improved.
Example two
Based on the same inventive concept as the data sharing method for the smart city in the foregoing embodiment, the present invention further provides a data sharing system for the smart city, as shown in fig. seven, where the apparatus includes:
a first obtaining unit 11, where the first obtaining unit 11 is configured to obtain format information of first data;
a second obtaining unit 12, wherein the second obtaining unit 12 is used for obtaining the content information of the first data;
a first input unit 13, where the first input unit 13 is configured to input format information and the content information of the first data into a training model, where the training model is obtained by training multiple sets of training data, and each set of training data in the multiple sets includes: format information and the content information of the first data and identification information for identifying the first data category;
a third obtaining unit 14, where the third obtaining unit 14 is configured to obtain output information of the training model, where the output information includes category information of the first data;
a first sharing unit 15, where the first sharing unit 15 is configured to perform data sharing on the first data of different categories through different sharing channels.
Further, the apparatus further comprises:
a fourth obtaining unit configured to obtain attribute information of the first data;
further, the apparatus further comprises:
a fifth obtaining unit, configured to perform feature extraction on the attribute information to obtain suffix information of the first data;
further, the apparatus further comprises:
a sixth obtaining unit, configured to obtain format information of the first data according to suffix information of the first data;
further, the apparatus further comprises:
a first determining unit, configured to determine, according to format information of the first data, an obtaining manner of the first data content information;
further, the apparatus further comprises:
a seventh obtaining unit, configured to obtain content information of the first data according to an obtaining manner of the content information of the first data;
further, the apparatus further comprises:
an eighth obtaining unit, configured to, if the format information of the first data is image information, perform feature extraction on the first data to obtain content information of the first data;
further, the apparatus further comprises:
a ninth obtaining unit, configured to perform semantic recognition on the first data to obtain content information of the first data if the format information of the first data is text information.
Further, the apparatus further comprises:
a tenth obtaining unit configured to obtain attribute information of the first data; (ii) a
Further, the apparatus further comprises:
an eleventh obtaining unit configured to obtain usage information of the first data according to attribute information of the first data;
further, the apparatus further comprises:
a twelfth obtaining unit, configured to adjust the category information of the first data according to the usage information, and obtain secondary classification information of the first data;
further, the apparatus further comprises:
and the second sharing unit is used for sharing the first data of different categories through the sharing channels with the same quantity as the secondary classification information according to the secondary classification information.
Further, the apparatus further comprises:
a thirteenth obtaining unit configured to obtain the number of categories of the first data according to category information of the first data;
further, the apparatus further comprises:
a fourteenth obtaining unit, configured to obtain, according to the number of categories of the first data, the number of shared channels that is the same as the number of categories of the first data; and performing data sharing on the first data of different categories through different sharing channels.
Further, the apparatus further comprises:
a fifteenth obtaining unit, configured to classify the shared channel according to class information of the first data, and obtain class information of the shared channel, where the class information of the first data corresponds to the class information of the shared channel;
further, the apparatus further comprises:
a first matching unit, configured to match the first data with the shared channel according to the category information; and carrying out data transmission on the first data through a shared channel matched with the first data.
Various modifications and embodiments of a data sharing method for a smart city in the first embodiment of fig. 1 are also applicable to a data sharing system for a smart city in the present embodiment, and a detailed description of the data sharing method for a smart city is given above to clearly understand that a method for implementing a data sharing system for a smart city in the present embodiment is not described herein for brevity of description.
Exemplary electronic device
The electronic apparatus of the embodiment of the present application is described below with reference to fig. eight.
Fig. eight illustrates a schematic structural diagram of an electronic device according to an embodiment of the present application.
Based on the inventive concept of a data sharing method for a smart city as in the previous embodiments, the present invention further provides a data sharing system for a smart city, on which a computer program is stored, which when executed by a processor implements the steps of any one of the aforementioned data sharing methods for a smart city.
Where in fig. 8 a bus architecture (represented by bus 300), bus 300 may include any number of interconnected buses and bridges, bus 300 linking together various circuits including one or more processors, represented by processor 302, and memory, represented by memory 304. The bus 300 may also link together various other circuits such as peripherals, voltage regulators, power management circuits, and the like, which are well known in the art, and therefore, will not be described any further herein. A bus interface 306 provides an interface between the bus 300 and the receiver 301 and transmitter 303. The receiver 301 and the transmitter 303 may be the same element, i.e., a transceiver, providing a means for communicating with various other apparatus over a transmission medium.
The processor 302 is responsible for managing the bus 300 and general processing, and the memory 304 may be used for storing data used by the processor 302 in performing operations.
Exemplary readable storage Medium
Based on the same inventive concept as the data sharing method for smart cities in the foregoing embodiments, the present invention also provides a computer-readable storage medium having stored thereon a computer program which, when executed by a processor, implements the steps of:
obtaining format information of first data; obtaining content information of the first data; inputting format information and the content information of the first data into a training model, wherein the training model is obtained by training a plurality of groups of training data, and each group of training data in the plurality of groups comprises: format information and the content information of the first data and identification information for identifying the first data category; obtaining output information of the training model, wherein the output information comprises category information of the first data; and performing data sharing on the first data of different categories through different sharing channels.
The embodiment of the invention provides a data sharing method for a smart city, wherein the method comprises the following steps: obtaining format information of first data; obtaining content information of the first data; inputting format information and the content information of the first data into a training model, wherein the training model is obtained by training a plurality of groups of training data, and each group of training data in the plurality of groups comprises: format information and the content information of the first data and identification information for identifying the first data category; obtaining output information of the training model, wherein the output information comprises category information of the first data; and performing data sharing on the first data of different categories through different sharing channels. The problem of among the prior art data sharing inefficiency is solved, realize carrying out categorised sharing to data, improve sharing efficiency, the technical effect of scattered data of effective integration.
As will be appreciated by one skilled in the art, embodiments of the present invention may be provided as a method, system, or computer program product. Accordingly, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present invention may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present invention is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks. While preferred embodiments of the present invention have been described, additional variations and modifications in those embodiments may occur to those skilled in the art once they learn of the basic inventive concepts. Therefore, it is intended that the appended claims be interpreted as including preferred embodiments and all such alterations and modifications as fall within the scope of the invention.
It will be apparent to those skilled in the art that various changes and modifications may be made in the present invention without departing from the spirit and scope of the invention. Thus, if such modifications and variations of the present invention fall within the scope of the claims of the present invention and their equivalents, the present invention is also intended to include such modifications and variations.