Vehicle-road cooperation street lamp lighting intelligent identification method and system based on Internet of Things
By adopting an intelligent vehicle-road collaborative recognition method based on the Internet of Things in street light monitoring, combining the semantic implicit representation of prior labels and embedded mapping neural networks, the problems of low manual patrol efficiency and lack of prior knowledge in the existing technology are solved, and higher light monitoring accuracy is achieved.
Patent Information
- Application Number
- CN202510042131.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-10
- Publication Date
- 2025-04-29
- Estimated Expiration
- 2045-01-10
AI Technical Summary
The existing street light monitoring methods rely on manual patrols, are inefficient and prone to human errors, and advanced machine learning models lack clear prior knowledge guidance, resulting in a decrease in detection accuracy in the absence of data or abnormal situations.
The intelligent identification method of vehicle-road collaborative street lights based on the Internet of Things is adopted. By obtaining the time series of past lights information, data integration is carried out in combination with the semantic implicit representation of prior labels, and using embedded mapping neural networks for prediction, improving the accuracy of light monitoring.
By integrating the semantic information of the lighting information and the prior label, the accuracy of data analysis and model training is improved, the detection ability in the absence or abnormal data is enhanced, and the accuracy of street light monitoring is improved.
Smart Images

Figure CN119904822A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of data processing, and in particular to a method and system for intelligently identifying street lamps in a vehicle-road cooperative manner based on the Internet of Things. Background Art
[0002] With the rapid development of Internet of Things technology, the concept of smart city has gradually gained popularity. As an important part of smart city construction, the vehicle-road cooperative system is of great significance for improving the efficiency of urban public lighting management. In the vehicle-road cooperative system, the intelligent monitoring and management of street lights is a key link, which directly affects the safety of roads and the travel experience of residents. Traditional street light detection mainly relies on manual inspections, which is inefficient and difficult to cope with complex and changing urban environments. In recent years, with the widespread application of big data, cloud computing and artificial intelligence technologies, intelligent street light recognition and control technology based on the Internet of Things has emerged, which provides the possibility for accurate monitoring and dynamic analysis of street light lighting. Since the existing methods rely on the lighting data obtained by manual inspections when monitoring street lights, human errors during this detection period will have a greater impact on the actual data. In addition, although some advanced machine learning models (such as neural networks) have been applied to street light detection, these models usually lack clear prior knowledge guidance, resulting in a decrease in the accuracy of street light detection in the absence of data or abnormal conditions. Summary of the invention
[0003] In view of this, the embodiment of the present application at least provides a method and system for intelligently identifying street lamps in vehicle-road cooperative lighting based on the Internet of Things. The technical solution of the present application is implemented as follows:
[0004] On the one hand, an embodiment of the present application provides a method for intelligent identification of street light lighting based on vehicle-road collaboration in the Internet of Things, the method comprising: obtaining a time series set of past lighting information of the number of lights that should be turned on; the time series set of past lighting information includes the lighting information of the number of lights that should be turned on at each past moment in multiple past moments, wherein the past lighting information is obtained through a street light status image taken by a vehicle camera, the vehicle GPS positioning information and the street light GPS coordinate information; at the same time, each of the lighting information is arranged according to the chronological order of their respective past moments; obtaining a priori labels corresponding to each lighting information in the time series set of past lighting information, the priori labels being labels indicating the number of lights that should be turned on. A descriptive label for the evolution of the number of lights, wherein the moment characterizing the evolution in the descriptive label is located after the past moment of the lighting information corresponding to the prior label; extracting the semantic implicit representation of each of the prior labels to obtain the semantic implicit representation of each of the prior labels; integrating each lighting information in the past lighting information time series set with the semantic implicit representation of the corresponding prior label to obtain integrated information, and obtaining a past integrated information time series set; based on the past integrated information time series set, detecting the lighting information of the target number of lights to be turned on at each analysis moment in a plurality of sequentially distributed analysis moments, and obtaining an estimated lighting information time series set; the analysis moment is located after each of the past moments.
[0005] On the other hand, the present application provides a computer system, including a memory and a processor, wherein the memory stores a computer program executable on the processor, and the processor implements the steps in the above method when executing the program.
[0006] The beneficial effects of the present application include at least: in the method provided by the present application, because the prior label is a descriptive label representing the evolution of the number of lights that should be turned on for the target, and the moment representing the evolution in the descriptive label is located after the past moment of the lighting information corresponding to the prior label, then, the lighting information in the sample is respectively integrated with the semantic implicit representation of the corresponding prior label to obtain integrated information, so that the integrated information in the integrated information time series set can include the information in the prior label, and because the prior label contains real information, then debugging the embedded mapping neural network based on the integrated information time series set can enable the embedded mapping neural network to learn real information, so that when the embedded mapping neural network is used to estimate the time series set, the accuracy of the time series set estimation can be increased, that is, the accuracy of lighting monitoring is improved. BRIEF DESCRIPTION OF THE DRAWINGS
[0007] The drawings herein are incorporated into the specification and constitute a part of the specification. These drawings illustrate embodiments consistent with the present application and are used together with the specification to illustrate the technical solution of the present application.
[0008] Figure 1A schematic diagram of the implementation flow of a method for intelligently identifying street lamps in a vehicle-road cooperative manner based on the Internet of Things provided in an embodiment of the present application.
[0009] Figure 2 A hardware entity diagram of a computer system provided in an embodiment of the present application. DETAILED DESCRIPTION
[0010] The embodiment of the present application provides a method for intelligently identifying street lamps in vehicle-road cooperative lighting based on the Internet of Things, which can be executed by a processor of a computer system. The computer system can refer to a device with data processing capabilities such as a server, a laptop, a tablet computer, and a desktop computer.
[0011] Figure 1 A schematic diagram of the implementation process of a method for intelligently identifying street lamps in a vehicle-road cooperative manner based on the Internet of Things provided in an embodiment of the present application is shown in FIG. Figure 1 As shown, the method includes:
[0012] Step S100: Obtain a time series set of past lighting information of the target number of lights that should be on; the time series set of past lighting information includes the lighting information of the target number of lights that should be on at each past moment in multiple past moments, wherein the past lighting information is obtained through the street light status image taken by the vehicle camera, the vehicle GPS positioning information and the street light GPS coordinate information; at the same time, each of the lighting information is arranged according to the chronological order of their respective past moments.
[0013] In step S100, in order to construct a time series set of past lighting information and detect the lighting status of street lamps, the computer system can access a comprehensive Internet of Things platform that integrates multiple sensors and data acquisition devices. In this scenario, the main data sources are moving vehicles equipped with cameras, GPS locators and display screens, and street lamp poles with GPS coordinate information.
[0014] During the data collection process, a high-definition camera is installed on the top of each vehicle involved in the data collection to capture images of the street lamp status along the road. At the same time, the vehicle is also equipped with a GPS locator to record the vehicle's geographic location information in real time. Although the display screen does not directly participate in data collection in this scenario, it can be used to display relevant information to the driver or the remote monitoring center. GPS receivers are pre-installed on all street lamp poles, so that each street lamp has unique GPS coordinate information, which is pre-imported into the computer system. In this way, the system can know the exact location of each street lamp. When the vehicle is driving on the detection road, the on-board camera will continuously capture images along the road. The computer system uses image recognition technology (such as convolutional neural network CNN based on deep learning) to analyze these images and identify the street lamps that are on. This process is completed automatically without human intervention. In order to improve the accuracy of recognition, the computer system also uses the dynamic change relationship between the GPS coordinates of the moving vehicle and the street lamp pole for auxiliary verification. Specifically, when the camera recognizes that a street lamp is on, the system will immediately find the GPS coordinates of the lamp pole near the current vehicle position and check whether these coordinates match the street lamp identified as on. This step effectively reduces the possibility of misidentification and improves the reliability of the data. For each frame of the image, the system records the number of street lights identified as on and their corresponding timestamps (i.e., past moments). This information is transmitted to the database of the computer system in real time. Over time, the system accumulates a large amount of lighting data. In step S100, the computer system arranges these data in chronological order according to the timestamps to form an ordered time series set of past lighting information. For example, the set may contain the following data items: {(2024-07-01 20:00, 80), (2024-07-01 21:00, 85), ...}, where each tuple represents a time point and the number of lights corresponding to that time point.
[0015] Step S200: Obtain a priori labels corresponding to each lighting information in the past lighting information time series set, wherein the priori labels are descriptive labels representing the evolution of the number of lights that should be on, and the moment representing the evolution in the descriptive label is after the past moment of the lighting information corresponding to the priori label.
[0016] In step S200, the computer system obtains the priori labels corresponding to the lighting information at each time point (i.e., past moments) in the past lighting information time series set. These priori labels describe the evolution of the number of target lights that should be on within a specific time period, such as the increase, decrease, or remain unchanged, and the time point pointed to by the description of this evolution is after the time point when the actual lighting information is recorded.
[0017] First, the computer system has collected and organized an orderly time series set of past lighting information through step S100, which includes multiple time points and their corresponding actual number of lights on. However, knowing only these specific numbers of lights on is not enough to fully understand the changing trend of the lighting status of street lights, so it is necessary to introduce prior labels to further describe this changing trend. Prior labels are a set of predefined descriptive words or phrases used to represent the evolution of the number of lights on over time. In practical applications, these labels can be set according to specific needs, such as "increase in quantity", "decrease in quantity", "stable quantity", etc. These labels not only reflect the direction of change in the number of lights on, but may also contain information on the magnitude of the change. The process of obtaining prior labels usually relies on external data sources or domain knowledge.
[0018] Step S300: extracting the semantic implicit representation of each of the priori labels to obtain the semantic implicit representation of each of the priori labels.
[0019] In step S300, the computer system converts each prior label into a form that can be directly processed and understood by the computer, that is, extracts the semantic implicit representation of each prior label. Prior labels (such as "increase in quantity", "decrease in quantity") exist in the form of natural language, and when the computer system performs data analysis or model training, it needs to convert these text information into numerical form for effective calculation and processing. Semantic implicit representation is the key means to achieve this conversion. It can capture the core semantic information in the label and encode it into vectors, matrices or other forms of numerical data.
[0020] In the scenario of intelligent recognition of street lights in vehicle-road cooperative lighting based on the Internet of Things, extracting the semantic implicit representation of prior labels can be achieved through a variety of methods, including but not limited to:
[0021] Word Embedding: It uses pre-trained word embedding models (such as Word2Vec, GloVe, FastText, etc.) to obtain the vector representation of the label. These models are trained on large-scale text corpora and can map each word into a high-dimensional vector space, so that semantically similar words are closer in the vector space. For the prior labels in this scenario, these pre-trained models can be used directly to obtain their vector representations.
[0022] In some cases, the pre-trained word embedding model may not be directly applicable to labels in a specific field, or in order to further improve the accuracy of the representation, a custom feature extraction method can be designed. For example, a set of specific attributes (such as change trends, change magnitude, etc.) can be defined for each label, and corresponding numerical values can be manually assigned to each label. However, this method is usually more time-consuming and relies on the knowledge of domain experts. In this scenario, after the computer system extracts the semantic implicit representation of each prior label through step S300, these representations will be used in subsequent data integration (step S400) and model training (such as training of embedding mapping neural networks). For example, when training an embedding mapping neural network, these representations will be used as part of the network input to help the network learn the complex relationship between the number of lights on and the prior labels.
[0023] Step S400: Integrate each piece of lighting information in the past lighting information time series set with the semantic implicit representation of the corresponding priori label to obtain integrated information, thereby obtaining a past integrated information time series set.
[0024] In step S400, the computer system integrates each light-on information in the past light-on information time series set with the semantic implicit representation of its corresponding priori label, thereby generating a past integrated information time series set containing richer information.
[0025] Step S100 generates a time series set of past light-on information, which includes the light quantity data at multiple time points, such as {(t1,n1),(t2,n2),…,(tm,nm)}, where ti represents the time point and ni represents the number of lights at the corresponding time point. Step S300 generates a semantic implicit representation for each prior label. For example, the semantic implicit representation of the label "increase in quantity" may be a vector v 增加 =[v1,v2,…,vd], where d is the dimension of the vector. Next, in step S400, the computer system performs the following operations:
[0026] For each light-on information (ti, ni) in the past light-on information time series, find the semantic implicit representation of its corresponding prior label. This is usually achieved by matching timestamps or some kind of identifier. Integrate the found semantic implicit representation with the corresponding light-on information. The integration method can be simple splicing or more complex fusion methods. For example, if splicing is used, then the semantic implicit representation v of the light-on information (ti, ni) at time point ti and its corresponding label "increase in quantity" 增加 , the integrated information can be (ti,ni,v 增加). All the integrated information is arranged in chronological order to form a new time series set, namely the past integrated information time series set. This set not only contains the original number of lights on, but also incorporates the semantic information of the prior labels.
[0027] For example, suppose the past light-on information time series is {(2024−07−01,80),(2024−07−02,85)}, and it is known that the prior label of July 1, 2024 is “stable quantity”, and its semantic implicit representation is v 稳定 =[0.1,0.0,−0.1]; the prior label for July 2, 2024 is “increase in number”, and its semantic implicit representation is v 增加 =[0.2,0.1,0.1]. After integration, the past integrated information time series may be as follows: {((2024−07−01,80),v 稳定 ),((2024−07−02,85),v 增加 )}. In this set, each element is a tuple, which contains the timestamp, the number of lights on, and the corresponding semantic implicit representation.
[0028] Through the integration operation in step S400, the computer system not only retains the original data on the number of lights on, but also introduces the semantic information contained in the priori labels. This enables subsequent data analysis and model training to more comprehensively consider the changes in the number of lights on and the reasons or trends behind them.
[0029] Step S500: Based on the past integrated information time series set, estimate the lighting information of the target number of lights to be lit at each analysis moment in a plurality of sequentially distributed analysis moments to obtain an estimated lighting information time series set; the analysis moment is located after each of the past moments.
[0030] In step S500, the computer system uses the past integrated information time series set to estimate the number of target lights that should be on in the future (i.e., the analysis moment) and generates an estimated light-on information time series set. First, the computer system has obtained the past integrated information time series set containing the number of lights on and its corresponding prior label semantic implicit representation through the previous steps (especially step S400). This set provides rich historical data and semantic information for detecting the number of lights on.
[0031] Next, the computer system will use one or more machine learning models (such as time series detection models, deep learning models, etc.) to make predictions. These models are usually able to capture the time dependencies and potential patterns in the data, so as to accurately detect future values. Common time series detection models include ARIMA (autoregressive integrated moving average model), exponential smoothing, seasonal decomposition, etc. These models build detection models by analyzing the trend, seasonality, and random components in historical data. However, in this scenario, since the semantic implicit representation of the prior label is also included, these traditional models can be combined with additional feature engineering to effectively utilize this information. Considering the powerful representation learning ability of deep learning, models such as recurrent neural networks (RNN), long short-term memory networks (LSTM), gated recurrent units (GRU), or Transformers can be used for detection. These models can automatically learn complex nonlinear relationships from data and can handle long-term dependency problems in sequence data. In particular, they can directly process integrated information containing the number of lights on and semantic implicit representations without complex feature engineering.
[0032] Taking the deep learning model as an example, the computer system will perform the following steps to make an estimate:
[0033] Data preprocessing: Divide the past integrated information time series into training sets and test sets (if available). For each integrated information (including timestamp, number of lights on, and semantic implicit representation), normalization, standardization, or other forms of preprocessing can be performed so that the model can learn better.
[0034] Model training: Use the training set data to train the selected deep learning model. During the training process, the model will learn how to map the semantic implicit representation of the historical number of lights on and the prior labels to the future number of lights on. This usually involves minimizing a loss function (such as mean squared error MSE), which measures the difference between the model detection value and the actual value. The loss function is, for example:
[0035] MSE= ;
[0036] Where N is the number of samples, is the actual number of lights on in the i-th sample, is the number of lights that the model detects for the i-th sample.
[0037] Model evaluation: Use the test set data (or a portion of the training set data) to evaluate the performance of the model. Evaluation indicators may include MSE, root mean square error (RMSE), mean absolute error (MAE), etc.
[0038] Once the model is trained and evaluated, the computer system can use it to detect and analyze the number of lights on. This typically involves applying the model to data that contains future timestamps (but does not include the number of lights on) and generating a sequence of estimated numbers of lights on. For example, suppose a computer system has trained an LSTM model to detect the number of street lights on every night for the next week. For each analysis moment (for example, every night in the future), the model will output an estimated number of lights on. Arranging these estimated numbers in chronological order forms a time series of estimated light information, such as { 2024−07−08, 2024−07−09,…, 2024−07−14}, of which t represents the estimated number of lights on at time t.
[0039] Through step S500, the computer system can provide valuable detection information to the urban lighting management department, helping them to better arrange maintenance work according to the lighting status of street lamps, thereby increasing the lighting rate of street lamps and improving the quality of life of residents.
[0040] As an implementation scheme, the step S400, integrating each light-on information in the past light-on information time series set with the semantic implicit representation of the corresponding prior label to obtain integrated information, and obtaining the past integrated information time series set, may specifically include:
[0041] Step S410: for each light-on information in the past light-on information time series set, combining the light-on information with the semantic implicit representation of the corresponding priori label to obtain integrated information corresponding to each light-on information;
[0042] Step S420: Arranging the integrated information corresponding to each of the lighting information according to the timing of the lighting information in the past lighting information timing set to generate a past integrated information timing set.
[0043] In step S410, the computer system combines each light-on information item in the past light-on information time series set with the semantic implicit representation of its corresponding prior label, thereby generating an integrated information item containing richer information. This step is the basis for data integration, which ensures that the actual observed value of the number of lights on and the semantic information related to it can be considered simultaneously in the subsequent analysis process.
[0044] There are many ways to combine the light information with the implicit semantic representation of the prior label, but the most common and direct method is concatenation. Concatenation means directly connecting the number of lights on (a scalar value) with the implicit semantic representation of the prior label (a vector or matrix) to form a new data structure. This method is simple and intuitive, and easy to process later.
[0045] Assume that a certain lighting information item in the past lighting information time series is (t1, n1), where t1 represents the time point (such as 8:00 p.m. on July 1, 2024), and n1 represents the number of lights at that time point (such as 80). At the same time, assume that the prior label corresponding to the lighting information item is "stable quantity", and its semantic implicit representation is a 5-dimensional vector v 稳定 =[0.1,0.0,−0.1,0.05,−0.05].
[0046] In step S410, the computer system performs the following operations:
[0047] Identify the corresponding relationship: First, the computer system determines (t1, n1) and v 稳定 This is usually achieved through timestamps, identifiers or other metadata.
[0048] Data concatenation: Next, the computer system combines n1 (a scalar value) with v 稳定 (a vector). Since n1 is a scalar, in order to maintain the consistency of the data structure, it can be regarded as a one-dimensional vector (or array), such as [n1]. Then, the two vectors are directly connected together to form a new integrated information vector. In this example, the integrated information vector will be [80, 0.1, 0.0, −0.1, 0.05, −0.05].
[0049] Generate an integrated information item: Finally, the computer system associates this integrated information vector with the original timestamp t1 to generate a complete integrated information item, such as (t1, [80, 0.1, 0.0, −0.1, 0.05, −0.05]).
[0050] The integrated information item generated by step S410 not only includes the original information on the number of lights on, but also incorporates the related prior knowledge (i.e., the semantic implicit representation of the prior label). This integration method enables subsequent data analysis and model detection to take into account both the actual changes in the number of lights on and the semantic meanings behind these changes, thereby improving the accuracy of analysis and detection.
[0051] In step S420, the task of the computer system is to arrange each integrated information item generated in step S410 according to their original time sequence in the past lighting information time sequence set, so as to form an ordered past integrated information time sequence set. The computer system only needs to traverse the list of integrated information items generated in step S410 and sort them according to the timestamp corresponding to each integrated information item (if they are already ordered in step S410, this step can be omitted). After the sorting is completed, an ordered past integrated information time sequence set is obtained.
[0052] Continuing with the above example, assume that there are already the following two integration information items:
[0053] The first integrated information item: (t1, [80, 0.1, 0.0, −0.1, 0.05, −0.05]) represents the semantic implicit representation of the lighting situation at 8 pm on July 1, 2024 and its corresponding “stable quantity” prior label.
[0054] The second integrated information item (assuming it is generated by a process similar to step S410): (t2, [85, 0.2, 0.1, 0.1, −0.05, 0.0]), represents the semantic implicit representation of the lighting situation at 8 pm on July 2, 2024 and its corresponding “increase in quantity” prior label.
[0055] In step S420, the computer system performs the following operations: First, the computer system identifies the timestamps (t1 and t2) in each integrated information item. Then, the integrated information items are sorted according to the order of the timestamps. In this example, since t1 is earlier than t2, the sorted order remains unchanged. Finally, the sorted integrated information items are combined into an ordered past integrated information time series set, namely, {(t1,[80,0.1,0.0,−0.1,0.05,−0.05]),(t2,[85,0.2,0.1,0.1,−0.05,0.0])}.
[0056] The ordered time series of past integrated information provides a key data foundation for subsequent data analysis and model testing. Because it retains the time series characteristics of the original lighting data and incorporates related prior knowledge, it can more accurately reflect the changes in the lighting status of street lights over time. Integrated information has a wide range of applications in intelligent identification scenarios of street lights based on vehicle-road collaboration in the Internet of Things. The following are some specific application scenario examples:
[0057] Statistics on street light lighting rate: By comparing the current number of lights on with the historical data in the past integrated information time series set, abnormal lighting status can be identified. Combined with the semantic information of the prior label, the street light lighting rate of the entire road can be counted, providing timely lighting abnormality information and accurate assessment basis for urban lighting management departments.
[0058] Improve road safety: Intelligent identification and optimized management of street lamp lighting status can not only improve the quality of nighttime lighting in cities, but also significantly improve road safety. By real-time monitoring of street lamp lighting status, abnormal lighting problems can be discovered and resolved in a timely manner, which is helpful in reducing the risk of traffic accidents.
[0059] As an implementation scheme, the method further includes: arranging the semantic implicit representations of the priori labels corresponding to each of the light-on information according to the timing of the light-on information in the past light-on information timing set to generate a semantic implicit representation timing set; based on this, the step S410, for each light-on information in the past light-on information timing set, combines the light-on information with the semantic implicit representation of the corresponding priori label to obtain the integrated information corresponding to each of the light-on information, which may specifically include:
[0060] Step S411: combining the lighting information and the semantic implicit representation located at the same position in the past lighting information time series set and the semantic implicit representation time series set to obtain integrated information corresponding to each lighting information.
[0061] Specifically, the computer system first traverses the past time series of lighting information, records the lighting information corresponding to each time point and the associated prior label. This correspondence is usually established through a timestamp or some unique identifier. For each prior label, the computer system uses a pre-trained word embedding model (such as Word2Vec, GloVe, etc.) or a custom feature extraction method to extract its semantic implicit representation. These representations can be in the form of vectors, and the value on each vector dimension reflects a semantic feature of the label.
[0062] According to the time sequence of the light-on information in the past light-on information time sequence set, the computer system arranges the corresponding semantic implicit representations in the same time sequence to generate a semantic implicit representation time sequence set. Each element in this set is a semantic implicit representation vector, which strictly corresponds to the light-on information in the past light-on information time sequence set in time.
[0063] Assume that the time series set of past light-on information is {(t1,n1),(t2,n2),…,(tm,nm)}, where ti represents the time point and ni represents the number of lights on at that time point. The corresponding prior label sequence is {l1,l2,…,lm}, where each li is a prior label describing the change in the number of lights on (such as "increase in number", "decrease in number" or "stable number"). For each prior label li, the computer system uses the Word2Vec model to extract its semantic implicit representation vector vli=[vi1,vi2,…,vid], where d is the dimension of the vector. Then, these vectors are arranged in chronological order to generate a semantic implicit representation time series set {vl1,vl2,…,vlm}.
[0064] After generating the semantic implicit representation time series set, the computer system may execute step S411 to combine each light-on information in the past light-on information time series set with the corresponding semantic implicit representation to generate integrated information.
[0065] The computer system first ensures that the elements in the past lighting information time series set and the semantic implicit representation time series set are strictly consistent in time. This is usually achieved by comparing timestamps or unique identifiers.
[0066] For each element (ti, ni) in the past light-on information time series set and the element vli at the corresponding position in the semantic implicit representation time series set, the computer system combines them into a new data structure. This combination can be a simple splicing operation, connecting the number of lights on ni (which can be regarded as a one-dimensional vector or scalar) with the semantic implicit representation vector vli. After the combination is completed, the computer system generates an integrated information item for each time point, which is arranged in chronological order to form a past integrated information time series set. Each integrated information item contains the number of lights on and the semantic information related to it.
[0067] Continuing with the previous example, for the light-on information (t1, n1) at time point t1 and the corresponding semantic implicit representation vector vl1, the computer system combines them into an integrated information item (t1, [n1, vl1]). Among them, [n1, vl1] is an extended vector that concatenates the number of lights n1 and the semantic implicit representation vector vl1. The same operation is performed for each element in the past light-on information time series set, and finally a complete past integrated information time series set is generated.
[0068] The generated integrated information time series set provides a richer and more comprehensive data foundation for subsequent data analysis and model testing. It not only contains the actual detection data of the number of lights on, but also incorporates the semantic information related to it. This integration method enables the model to capture the changing patterns of the number of lights on and the reasons or trends behind these changes during the training process, thereby improving the monitoring accuracy and generalization ability of the model.
[0069] As an implementation scheme, the step S500, based on the past integrated information time series set, estimates the lighting information of the target number of lights to be lit at each analysis moment in a plurality of sequentially distributed analysis moments to obtain the estimated lighting information time series set, which may specifically include:
[0070] Step S510: Decomposing the past integrated information time series set according to the semantic implicit representation included in each integrated information in the past integrated information time series set to obtain a plurality of segmented time series subsets; wherein the semantic implicit representation included in the integrated information in the same segmented time series subsets is the same, and the semantic implicit representation included in the integrated information in two adjacent segmented time series subsets is different;
[0071] Step S520: based on the plurality of segmented time series subsets, estimate the lighting information of the target number of lights to be lit at each analysis time in a plurality of sequentially distributed analysis times, and obtain an estimated lighting information time series set.
[0072] The purpose of step S500 is to estimate the target number of lights that should be turned on at multiple analysis moments in the future based on the past integrated information time series set, so as to form an estimated light-on information time series set.
[0073] In step S510, the computer system decomposes the past integrated information time series set to generate multiple segmented time series subsets. The purpose of this step is to group data segments with similar semantic features together based on the semantic implicit representation in the integrated information, so as to perform more targeted analysis and detection later.
[0074] The computer system first traverses the past integrated information time series set and extracts the semantic implicit representation in each integrated information item. These semantic implicit representations usually exist in the form of vectors, and the value on each dimension reflects a semantic feature of the prior label. Next, the computer system calculates the similarity between these semantic implicit representations. This can be achieved through a variety of methods, such as cosine similarity, Euclidean distance, etc. Based on the calculated similarity, the computer system divides the past integrated information time series set into multiple subsets. The basis for segmentation is whether the semantic implicit representations in the integrated information are similar. Specifically, integrated information items with similarity above a certain threshold can be classified into the same subset. The purpose of this is to cluster data fragments with the same or similar semantic features together for subsequent analysis.
[0075] Through the above process, the computer system generates multiple segmented time series subsets, each of which contains a series of integrated information items that are continuous in time order, and the semantic implicit representations of these items are similar.
[0076] Assume that the past integrated information time series set contains the following integrated information items:
[0077] Item 1:[80,v 稳定 ], Item 2:[82,v 稳定 ], Item 3:[78,v 减少 ]、Item 4:[75,v 减少 ]、Item 5:[85,v 增加 ]. Among them, v 稳定 、v 减少 and v 增加 are different semantic implicit representation vectors. By calculating the similarity and setting an appropriate threshold, the computer system may divide the above integrated information items into the following three subsets: Subset 1: {[80,v 稳定 ],[82,v 稳定 ]}, subset 2: {[78,v 减少 ],[75,v 减少 ]}, subset 3: {[85,v 增加 ]}.
[0078] In step S520, the computer system uses the multiple segmented time series subsets generated in step S510 to detect the number of target lights that should be on at multiple analysis moments. This step usually involves the training and detection process of the machine learning model. The computer system selects a suitable detection model to estimate the number of lights on in the future. Since this is a time series detection problem and the data has been segmented into subsets with similar semantic features, a model suitable for processing time series data can be selected, such as LSTM (Long Short-Term Memory Network), GRU (Gated Recurrent Unit) and other recurrent neural network models. If there is already a ready-made model trained for similar problems, it can be used directly; otherwise, the model needs to be retrained based on the existing data.
[0079] If a model that needs to be trained (such as LSTM) is selected, the computer system will use each segmented time series subset as training data to train the model. During the training process, the model will learn how to detect the future number of lights on from the historical number of lights on and its semantic implicit representation. This usually involves minimizing a loss function (such as mean squared error MSE), which measures the difference between the model's detection value and the actual value.
[0080] After the training is completed, the computer system uses the trained model to detect the number of lights on at multiple analysis moments in the future. For each segmented time series subset, a corresponding detection model can be trained, and then the detection is performed separately and the results are merged.
[0081] Arranging the detection results of all analysis moments in chronological order forms a time series set of detection lighting information.
[0082] Continuing with the previous example, assume that the computer system has trained an LSTM model for each segmented time series subset. For subset 1 (stable state), the model may learn that the number of lights on remains relatively stable in a short period of time; for subset 2 (decreasing state), the model may learn that the number of lights on gradually decreases; for subset 3 (increasing state), the model may learn that the number of lights on increases.
[0083] By decomposing the past integrated information time series set and detecting based on the segmented time series subset, the computer system can more accurately detect the number of target lights that should be on at multiple analysis moments. This process not only makes full use of the number of lights on information in the historical data, but also deeply mines the semantic features related to it, thereby improving the accuracy and reliability of monitoring.
[0084] As an implementation scheme, the step S520, based on the multiple segmented time sequence subsets, estimates the lighting information of the target number of lights to be lit at each analysis moment in multiple sequentially distributed analysis moments to obtain an estimated lighting information time sequence set, which may specifically include:
[0085] Step S521: performing embedding mapping on the plurality of segmented time sequence subsets respectively, and obtaining an embedded mapping implicit representation corresponding to each of the segmented time sequence subsets;
[0086] Step S522: generating an embedded mapping implicit representation sequence corresponding to the past lighting information time series set based on the embedded mapping implicit representation corresponding to each of the segmented time series subsets;
[0087] Step S523: based on the embedded mapping implicit representation sequence corresponding to the past lighting information time series set, estimate the lighting information of the target number of lights to be turned on at each analysis moment in a plurality of sequentially distributed analysis moments, and obtain an estimated lighting information time series set.
[0088] In step S521, the computer system embeds and maps (encodes) each segmented time series subset to generate their respective embedding map implicit representations. This process aims to convert the original time series data into a representation in a higher-dimensional or lower-dimensional space that can capture the intrinsic structure and characteristics of the data and facilitate subsequent detection tasks.
[0089] First, the computer system selects a suitable embedding mapping method. Since the segmented time series subset contains a series of integrated information items (each item consists of the number of lights on and the implicit semantic representation), an embedding mapping method that can process sequence data can be selected, such as recurrent neural network (RNN), long short-term memory network (LSTM), gated recurrent unit (GRU) or Transformer. These methods can capture the temporal dependencies and long-term dependencies in the sequence. Taking LSTM as an example, it is a special RNN that solves the shortcomings of traditional RNN in the long-term dependency problem by introducing forget gates, input gates and output gates. LSTM can convert each element in the sequence (here is the integrated information item in the segmented time series subset) into a fixed-dimensional vector representation, which is the implicit representation of the embedding mapping.
[0090] Next, the computer system trains the embedding mapping model. This usually involves a supervised learning process, in which the goal of the model is to minimize a loss function that measures the difference between the model output (the embedding mapping implicit representation) and the desired output (which may be some form of true label or reconstruction error). However, in this scenario, there is no direct desired output to supervise the embedding mapping process; instead, it is hoped that a useful representation can be learned through the embedding mapping that can play a role in subsequent detection tasks. Therefore, a common strategy is unsupervised learning or self-supervised learning. For example, the LSTM model can be trained using the structure of an autoencoder, in which the encoder part encodes the segmented time series subset into an embedding mapping implicit representation, while the decoder part attempts to reconstruct the original time series data from the embedding mapping implicit representation.
[0091] However, in this particular scenario, it is more likely to rely on the performance of the embedding mapping model in the subsequent detection task to indirectly evaluate its effectiveness. That is, these embedding mapping implicit representations will be used to perform detection in step S523, and the parameters of the embedding mapping model will be adjusted according to the accuracy of the detection results.
[0092] Once the embedding mapping model is trained (or reaches a predetermined number of training rounds), the computer system can apply it to all the segmented time series subsets to generate their respective embedding mapping implicit representations. These representations will serve as input for subsequent tasks.
[0093] Assume that there is a segmented time series subset containing the following integrated information items (simplified representation, omitting timestamps and some semantic implicit representation details):
[0094] Subset 1: {[80,v1],[82,v1]} (indicates that the number of lights on is stable); Subset 2: {[78,v2],[75,v2]} (indicates that the number of lights on is decreasing). v1 and v2 are different semantic implicit representation vectors.
[0095] The computer system uses the LSTM model to embed the subset. For each integrated information item in subset 1, the LSTM model reads the number of lights on and the semantic implicit representation (which can be merged into a vector) in turn, and generates an embedded mapping implicit representation vector of fixed dimension, such as e1. Similarly, a corresponding embedded mapping implicit representation vector e2 is generated for subset 2.
[0096] In step S522, the task of the computer system is to combine the embedded mapping implicit representations of each segmented time series subset generated in step S521 to form a complete embedded mapping implicit representation sequence. This sequence will serve as one of the inputs of the subsequent tasks.
[0097] First, the computer system arranges the embedded mapping implicit representations of each segmented time series subset according to the time order in the original past light information time series set. This ensures that the embedded mapping implicit representation sequence can preserve the time dependency of the original data. Then, the computer system merges the embedded mapping implicit representations of adjacent segmented time series subsets with similar semantic implicit representations in some form.
[0098] If a merge operation is really necessary, one possible approach is to use an attention mechanism to determine the relative importance of the implicit representations of different subset embedding maps and perform weighted merges accordingly. However, this approach is usually used in more complex sequence-to-sequence (Seq2Seq) tasks and requires an additional model to learn the attention weights.
[0099] Finally, the computer system generates a complete embedding map implicit representation sequence. Each element in this sequence is an embedding map implicit representation vector of a segmented time series subset, and these vectors are arranged in the time order of their original past light information time series set.
[0100] Continuing with the previous example, assume that there are two embedding mapping implicit representation vectors e1 and e2 for the segmented time series subsets. The computer system arranges them in the time order of the original data (assuming that subset 1 precedes subset 2 in time) and generates an embedding mapping implicit representation sequence [e1, e2].
[0101] In step S523, the final task of the computer system is to detect the lighting information at each of the multiple analysis moments using the embedded mapping implicit representation sequence generated in step S522. This process usually involves the application of a detection model that can detect the number of lights on based on the embedded mapping implicit representation of the historical data.
[0102] First, the computer system selects a suitable detection model. Since this is a time series detection problem and there is already an embedding map implicitly representing the sequence of data, some models specifically used for time series detection can be selected, such as LSTM, GRU, Temporal Convolutional Network (TCN), or a simple fully connected neural network (if the embedding map implicit representation has captured the intrinsic structure of the data well enough). In this scenario, since LSTM has been used to generate the embedding map implicit representation sequence, it may be a natural choice to continue using LSTM as the detection model. However, this is not absolute; the most suitable model can be selected based on the specific characteristics of the problem and experimental results.
[0103] Next, the computer system uses the historical data’s embedding map to implicitly represent the sequence to train a detection model. This typically involves a supervised learning process, where the model’s goal is to minimize the difference between the number of detected lights on and the number of lights that are actually on (measured by some loss function).
[0104] In this process, the number of lights on at the last few time points in the past light-on information time series can be used as the training target (i.e., the expected output), and their previous embedding mapping implicit representation sequence can be used as the input of the model. In this way, a model can be trained that can detect the number of lights on based on the embedding mapping implicit representation of historical data.
[0105] It is important to note that since we are working in an environment where new data is continuously collected (such as an IoT-based vehicle-road cooperative street lighting system), the detection model can be retrained regularly to adapt to new data distributions and patterns. Once the detection model is trained and its performance is verified to meet the requirements, the computer system can use it to detect the light information at each analysis moment in multiple analysis moments. This usually involves taking the sequence of implicit representations of the embedding mapping as the input of the model and obtaining the sequence of the number of detected lights as the output of the model.
[0106] Continuing with the previous example, assume that an LSTM detection model has been trained and is able to detect the number of lights on in the future based on the embedding map implicit representation of historical data. Now the model can be applied to the embedding map implicit representation sequence [e1, e2] generated in step S522 for detection.
[0107] The detection process is as follows: the embedding map implicit representation sequence [e1, e2] is used as the input of the LSTM detection model. The LSTM model reads each embedding map implicit representation vector (i.e., e1 and e2) in the sequence in turn, and uses its internal state to generate a detection of the number of lights on in the future. For each analysis moment (for example, every night in the next week), the LSTM model outputs a detected number of lights on. The detection results of all analysis moments are arranged in chronological order to form a time series set of estimated light on information.
[0108] As an implementation scheme, the embedding-mapping implicit representation is generated based on a debugged embedding-mapping neural network, and the debugging process of the embedding-mapping neural network includes:
[0109] Step S10: Obtain a positive training sample binary group, wherein the positive training sample binary group includes training samples corresponding to the target number of lights that should be turned on in several past time intervals with intersections, and the training samples corresponding to the past time intervals include the lighting information of the target number of lights that should be turned on at each past moment in the past time interval, and the lighting information in the training samples is arranged according to their respective order of priority.
[0110] The positive training examples are positive samples. In step S10, the computer system performs the following operations to obtain a positive training example binary:
[0111] First, the computer system determines several time intervals with intersections. The selection of these time intervals should be based on the availability of actual data and the requirements of the application scenario.
[0112] For each selected time interval, the computer system collects the lighting information of each past moment in the interval. This information usually comes from real-time monitoring data of IoT devices (such as vehicle-mounted cameras, GPS locators, etc.), and after processing, the number of lights on at each time point is obtained. For example, for time interval A (July 1 to July 7, 2024), the system may collect the following sequence of lighting information: {(tA1,nA1),(tA2,nA2),…,(tA7,nA7)}, where tAi represents the i-th time point in interval A, and nAi represents the number of lights on at that time point. Next, the computer system combines the lighting information sequences corresponding to these intersecting time intervals into positive training example tuples. Each tuple contains two or more training examples with similar time and partial overlap. The intersection between these examples reflects the continuous change in the number of lights on, while the non-intersection part may show a sudden change or periodic change in the number of lights on. For example, if time interval A partially overlaps with time interval B (July 4 to July 10, 2024), the lighting information sequence of interval A and the lighting information sequence of the corresponding overlapping part in interval B can be combined into a positive training example binary group.
[0113] Suppose there are two time intervals:
[0114] Period A: July 1, 2024 to July 7, 2024 (mainly working days);
[0115] Period B: July 4, 2024 to July 10, 2024 (including weekdays and weekends);
[0116] For these two intervals, the computer system may collect the following light-on information sequence: the light-on information sequence of interval A: {(2024-07-01,80),(2024-07-02,82),…,(2024-07-07,85)}; the light-on information sequence of interval B (note that only the part overlapping with interval A and the part after it are listed here): {(2024-0704,83),(2024-07-05,84),…,(2024-07-10,90)}. Since interval A and interval B overlap between July 4, 2024 and July 7, 2024, the computer system can combine the light-on information sequences of these two time periods into a positive training example binary: Positive training example binary: ({(2024-07-01,80),…,(2024-07-07,85)},{(2024-07-04,83),…,(at least including the corresponding data up to 2024-07-07,…)}). In actual operation, in order to maintain the consistency of the binary, it is usually necessary to ensure that the time points and the number of lights on in the overlapping parts of the two sequences are exactly the same (or at least very close), or to align them in some way (such as interpolation, resampling, etc.).
[0117] Step S20: Obtain a negative training example binary group, where the negative training example binary group includes training examples corresponding to the number of target lights that should be on in a number of past time intervals that do not have an intersection.
[0118] Negative training examples are negative samples. In the training process of the embedding mapping neural network, step S20 is responsible for obtaining negative training example pairs. These samples play a vital role in training the neural network. They help the network distinguish dissimilar or irrelevant data patterns, thereby improving its generalization ability and robustness to unseen data. In step S20, the computer system performs the following operations to obtain negative training example pairs:
[0119] Unlike the positive training examples in step S10, the time intervals in the negative training example binary group should not have intersections. This means that the lighting information in these intervals is not continuous in time and may represent completely different lighting modes or scenes. The computer system carefully selects these time intervals to ensure that they can cover various lighting situations that may be encountered in actual applications.
[0120] For each selected non-overlapping time interval, the computer system collects the lighting information of each past moment in the interval. This information also comes from the real-time monitoring data of the IoT device, but due to the discontinuity of the time interval, there may be no obvious correlation or trend between these data. After collecting the lighting information of all selected time intervals, the computer system constructs this information into negative training example tuples. Each tuple contains two or more training examples that are discontinuous in time and may have completely different lighting patterns. The differences between these examples help the network learn how to distinguish different lighting situations and avoid making incorrect detections on unseen data.
[0121] Suppose the following two non-intersecting time intervals are selected as sources of negative training examples:
[0122] Interval C: During the 2024 Spring Festival (the number of lights on may increase significantly);
[0123] Interval D: an ordinary working day in the summer of 2024 (the number of lights on is relatively stable);
[0124] For these two intervals, the computer system may collect the following sequence of light-on information: The sequence of light-on information in interval C (during the Spring Festival): {(2024-02-10,150),(2024-02-11,160),…}, indicating that the number of lights on during the Spring Festival increases significantly due to celebrations and other reasons. The sequence of light-on information in interval D (ordinary working days): {(2024-07-15,80),(2024-07-16,82),…}, indicating that the number of lights on on an ordinary working day in summer remains relatively stable. Since intervals C and D are discontinuous in time and have significantly different lighting patterns, the computer system can combine the lighting information sequences of these two time intervals into a negative training example binary: ({(2024-02-10,150),(2024-02-11,160),…},{(2024-07-15,80),(2024-07-16,82),…}). This negative training example binary provides comparative data support for the training of the embedding mapping neural network. By allowing the network to learn these dissimilar or irrelevant data patterns, it can help it make more accurate and robust detections when faced with unseen data.
[0125] Step S30: For each training example in the active training example binary group, each lighting information in the training example is respectively integrated with the semantic implicit representation of the corresponding prior label to obtain integrated information, and an integrated information sequence corresponding to each training example in the active training example binary group is generated.
[0126] In the training process of the embedding mapping neural network, step S30 integrates the light-on information in the active training examples with the corresponding prior label semantic implicit representation to generate an integrated information sequence containing rich context information. In this step, the computer system performs the following operations:
[0127] The computer system traverses all active training example tuples. Each tuple contains two or more training examples corresponding to time intervals with intersections, which reflect the continuity and similarity of the number of lights changing over time. For each training example in the tuple, the computer system extracts the light information (i.e., the number of lights at each time point) and the corresponding prior labels. Prior labels are descriptive labels for the trend or state of the number of lights, such as "increase in number", "stable number", etc. These labels are associated with the light information in some way (such as manual annotation or automatic extraction). Next, the computer system uses a pre-trained word embedding model or a custom feature extraction method to convert each prior label into a semantic implicit representation. This representation is usually a vector of fixed dimension that can capture the semantic features of the label. For example, word embedding models such as Word2Vec and GloVe can be used to generate vector representations of labels. For each light information item in the training example (including time point and number of lights), the computer system integrates it with the corresponding prior label semantic implicit representation. The integration method can be a simple concatenation operation, connecting the number of lights on (which may be converted into vector form) with the semantic implicit representation vector to form a new integrated information vector. Finally, the computer system arranges all the integrated information vectors in chronological order to generate a corresponding integrated information sequence. This sequence not only contains the original number of lights on, but also incorporates the semantic information of the prior label, providing rich data support for subsequent neural network training.
[0128] Suppose there is a positive training example binary, which contains training examples corresponding to two time intervals with intersection. For one of the training examples (taking time interval A as an example), the light information sequence is: {(tA1,nA1),(tA2,nA2),…,(tAk,nAk)}, where tAi represents the time point and nAi represents the number of lights at the corresponding time point. The prior label sequence associated with this training example may be: {lA1,lA2,…,lAk}, where each lAi is a label describing the trend of the number of lights (such as "the number increases").
[0129] For each prior label lAi, the computer system uses the word embedding model to generate its semantic implicit representation vector vAi. Then, each light information item (tAi, nAi) is integrated with the corresponding semantic implicit representation vector vAi to generate an integrated information vector. For example, the integrated information vector can be obtained by concatenation: ,in, The number of lights that will be on The process of converting to vector form (if If it is a numerical type, it can be encoded or embedded in some form first). Finally, all integrated information vectors are arranged in chronological order to generate an integrated information sequence: .
[0130] This integrated information sequence will be used as one of the inputs of the embedding mapping neural network for the training process. By integrating the semantic implicit representation of the light information and the prior label, the computer system provides the neural network with richer and more comprehensive learning materials, which helps to improve its detection accuracy and robustness.
[0131] Step S40: for each training example in the negative training example binary group, each lighting information in the training example is respectively integrated with the semantic implicit representation of the corresponding priori label to obtain integrated information, and an integrated information sequence corresponding to each training example in the negative training example binary group is generated.
[0132] In the training process of the embedding mapping neural network, step S40 is similar to step S30 in operation, but is for negative training example tuples. This step aims to integrate the lighting information in the negative training examples with the corresponding implicit representation of the prior label semantics to generate an integrated information sequence, thereby providing the neural network with more diverse learning materials and enhancing its ability to distinguish different lighting modes. The following is a detailed explanation of step S40, combined with specific application scenarios.
[0133] In this step, the computer system performs the following operations to process negative training example bigrams:
[0134] First, the computer system traverses all negative training example tuples. Each tuple contains two or more training examples corresponding to non-intersecting time intervals. These examples may have completely different lighting patterns, reflecting the lighting conditions of street lights in different scenarios or conditions. For each training example in the tuple, the computer system extracts the lighting information (i.e., the number of lights at each time point) and the corresponding prior labels. Similar to the positive training examples, these prior labels describe a certain state or trend of the number of lights, such as "decreased number", "abnormal state", etc. Using a pre-trained word embedding model or a custom feature extraction method, the computer system converts each prior label into a semantic implicit representation. These representations are usually vectors of fixed dimensions that can capture the semantic features of the label and serve as feature inputs in the subsequent network training process. For each lighting information item in the training example (including time point and number of lights), the computer system integrates it with the corresponding prior label semantic implicit representation. The integration method is usually a simple concatenation operation, connecting the number of lights on (which can be encoded or embedded first) with the semantic implicit representation vector to form an integrated information vector containing rich contextual information. Finally, the computer system arranges all the integrated information vectors in chronological order to generate a corresponding integrated information sequence. This sequence not only contains the actual observations of the number of lights on, but also incorporates the semantic information of the prior labels, providing more comprehensive training data for the neural network.
[0135] Suppose there is a negative training example binary, which contains training examples corresponding to two time intervals that do not have intersection. Taking one of the time intervals (such as interval D) as an example, its light-on information sequence may be: {(tD1,nD1),(tD2,nD2),…,(tDn,nDn)}, where tDi represents the time point and nDi represents the number of lights on at the corresponding time point. The prior label sequence associated with this training example is: {lD1,lD2,…,lDn}. Each lDi is a label describing the state of the light, such as "abnormal decrease in quantity". For each prior label lDi, the computer system uses a word embedding model (such as Word2Vec) to generate its semantic implicit representation vector vDi. Then, each light-on information item (tDi,nDi) is integrated with the corresponding semantic implicit representation vector vDi to generate an integrated information vector. For example, through the concatenation operation, we get: ,in, The number of lights that will be on The process of converting to vector form. Finally, all integrated information vectors are arranged in chronological order to generate an integrated information sequence: This integrated information sequence will serve as one of the training data for the embedding mapping neural network, helping the network learn the differences between different lighting patterns, thereby improving its ability to distinguish and detect unseen data.
[0136] Step S50: Debugging the embedding mapping neural network based on the integrated information sequence corresponding to each training example in the positive training example binary group and the integrated information sequence corresponding to each training example in the negative training example binary group.
[0137] In the training process of the embedding mapping neural network, step S50 uses the integrated information sequence of positive training examples and negative training examples to debug (i.e., train and optimize) the neural network. This step aims to adjust the parameters of the neural network so that it can accurately capture the law of changes in the number of lights on and effectively distinguish the data features under different lighting modes.
[0138] In this step, the computer system performs the following operations to debug the embedding mapping neural network:
[0139] The computer system first ensures that the integrated information sequences of positive training examples and negative training examples have been generated according to steps S30 and S40. These sequences contain the integrated information of the number of lights on and the implicit representation of the semantics of the prior label, providing rich learning materials for the neural network. Next, the computer system defines a suitable embedding mapping neural network structure. This network may contain multiple layers, such as an input layer, a hidden layer (which may contain recurrent neural network units such as LSTM, GRU to process sequence data), and an output layer. Each layer has its specific parameters (such as weights and biases), which will be optimized during the training process. In order to evaluate the performance of the neural network and guide parameter optimization, the computer system selects a suitable loss function (such as mean square error MSE, cross entropy loss, etc.) and an optimization algorithm (such as stochastic gradient descent SGD, Adam, etc.). The loss function is used to quantify the difference between the network detection value and the actual value, while the optimization algorithm is used to adjust the network parameters according to the gradient of the loss function. During the training process, the computer system first inputs the integrated information sequence into the neural network for forward propagation. During the forward propagation process, the input data passes through each layer of the network and finally generates a detection output. The system then calculates the loss value between the detected output and the actual output, and back-propagates the loss value back to each layer of the network through the back-propagation algorithm to calculate the gradient of each layer. Using the gradient information obtained by back-propagation, the computer system updates the parameters (weights and biases) of the neural network. This step usually involves multiplying the gradient with the preset learning rate and subtracting the product from the current parameter value to achieve parameter optimization. The above process (forward propagation, loss calculation, back-propagation, and parameter update) will be repeated multiple times on the entire training set until a certain stopping condition is met (such as the loss value is less than a certain threshold, the number of iterations reaches a preset upper limit, etc.). Each iteration aims to further reduce the loss value and improve the detection accuracy of the neural network.
[0140] During the training process, the positive integrated information sequence is input into the network for forward propagation to obtain the detection output. Then, the MSE loss value between the detection output and the actual output is calculated. Next, the gradient of each layer is calculated by the back-propagation algorithm, and the weights and biases of the network are updated using the Adam optimization algorithm. This process will be repeated multiple times on the entire positive training set. At the same time, the integrated information sequence of the negative training examples will also be used in the network training process in the same way. By considering the data features of both positive and negative training examples, the computer system can debug an embedding mapping neural network model that can accurately detect changes in the number of lights on and distinguish different lighting modes. Finally, the trained neural network model will be used in the actual vehicle-road cooperative street light intelligent recognition task to achieve real-time monitoring and detection of the street light status.
[0141] As an implementation scheme, the step S50, based on the integrated information sequence corresponding to each training example in the positive training example binary group and the integrated information sequence corresponding to each training example in the negative training example binary group, debugs the embedding mapping neural network, specifically including:
[0142] Step S51: Load the integrated information sequence corresponding to each training sample in the active training sample binary group into the embedding mapping neural network to embed multiple embedding mapping implicit representations, and obtain the embedding mapping implicit representation sequence corresponding to each training sample in the active training sample binary group.
[0143] In step S51, the computer system inputs the integrated information sequence corresponding to each training example in the active training example binary group into the embedding mapping neural network, and converts these sequences into embedded mapping implicit representations through the network's calculation process, thereby generating an embedded mapping implicit representation sequence unique to each training example. This process is a key step in neural network training because it provides rich feature representations for subsequent model debugging and optimization. The computer system first traverses the active training example binary group, and extracts the corresponding integrated information sequence for each training example therein. These sequences contain the integrated information of the number of lights on and the implicit representation of the prior label semantics, and are the input data for the subsequent embedding mapping. Before performing the embedding mapping, a suitable neural network structure can be defined. This network usually contains multiple layers, such as an input layer, a hidden layer (which may contain recurrent neural network units such as LSTM and GRU to process sequence data) and an output layer. The specific structure of the network depends on the complexity of the problem and the characteristics of the data. In this scenario, since time series data is processed, the hidden layer may use units such as LSTM or GRU that can capture sequence dependencies.
[0144] The integrated information sequence of each training example is taken as input and loaded into the embedding mapping neural network. The network calculates and transmits information layer by layer through the forward propagation process, and finally generates a series of embedded mapping implicit representations. These representations are the mappings of the original integrated information sequence in the neural network feature space, which capture the key information and patterns in the sequence. For each input integrated information sequence, the embedding mapping neural network outputs a corresponding embedding mapping implicit representation sequence. Each element in this sequence is an embedding vector, which represents the feature representation of a certain time point or segment in the original sequence.
[0145] For example, suppose there is a positive training example binary, which contains two training examples A and B, which correspond to the information of lights on in two overlapping time intervals. The integrated information sequence of training example A is: {[encode(nA1), vA1], [encode(nA2), vA2], ...}; the integrated information sequence of training example B is: {[encode(nB1), vB1], [encode(nB2), vB2], ...}; where encode(nAi) and encode(nBi) are the encoded representations of the number of lights on nAi and nBi respectively (if they are scalar values, numerical embedding may be performed first), and vAi and vBi are the semantic implicit representation vectors of the prior labels. These integrated information sequences are loaded into the embedding mapping neural network respectively. The network processes these sequences through its internal structure (such as LSTM unit) and outputs the corresponding embedding mapping implicit representation sequence: the embedding mapping implicit representation sequence of training sample A: {eA1, eA2, …}; the embedding mapping implicit representation sequence of training sample B: {eB1, eB2, …}; where eAi and eBi are embedding vectors generated by the network, which capture the feature information of the corresponding time points or fragments in the integrated information sequence.
[0146] Through step S51, the computer system successfully converts the integrated information sequence in the active training examples into an embedded mapping implicit representation sequence. These representations not only contain the key information of the original data, but also introduce higher-level feature abstraction through the nonlinear transformation of the neural network.
[0147] Step S52: Load the integrated information sequence corresponding to each training sample in the negative training sample binary group into the embedding mapping neural network to embed multiple embedding mapping implicit representations, and obtain the embedding mapping implicit representation sequence corresponding to each training sample in the negative training sample binary group.
[0148] In step S52, the task of the computer system is similar to that of step S51, but the object of processing is changed from the positive training sample binary to the negative training sample binary. The goal of this step is to transform the integrated information sequence corresponding to each training sample in the negative training sample through the embedding mapping neural network to generate their own unique embedding mapping implicit representation sequence.
[0149] The computer system traverses the negative training sample tuples and extracts the corresponding integrated information sequence for each training sample. These sequences also contain the integrated information of the number of lights on and the implicit representation of the semantics of the prior label, but compared with the positive training samples, they represent different or relatively independent lighting patterns. Similar to step S51, the computer system uses the defined embedding mapping neural network to process these negative training samples. This means that the structure and parameters of the network remain unchanged between steps S51 and S52, ensuring the consistency and comparability of data processing. The integrated information sequence of each negative training sample is used as input and loaded into the embedding mapping neural network. The network processes the input sequence layer by layer through its internal structure and parameters, and finally generates a series of embedded mapping implicit representations. These representations capture the intrinsic features and patterns of the lighting data in the negative training samples. For each input negative training sample integrated information sequence, the embedding mapping neural network will output a corresponding embedding mapping implicit representation sequence. Each embedded vector in the sequence is a point in the neural network feature space of the original data, representing the lighting state characteristics of a specific time point or segment. For example, suppose there is a negative training example binary group, which includes two training examples C and D, which correspond to the light-on information of two non-intersecting time intervals.
[0150] The integrated information sequence of training example C: {[encode(nC1),vC1],[encode(nC2),vC2],…};
[0151] The integrated information sequence of sample D: {[encode(nD1),vD1],[encode(nD2),vD2],…};
[0152] Similar to step S51, these integrated information sequences are loaded into the embedding mapping neural network respectively. The network processes these sequences through its LSTM or GRU recurrent neural network units and outputs the corresponding embedding mapping implicit representation sequence:
[0153] The embedding map of training example C implicitly represents the sequence: {eC1, eC2, …};
[0154] The embedding map of training example D implicitly represents the sequence: {eD1, eD2, …};
[0155] These embedding vectors eCi and eDi capture the characteristics of the light-on data in the negative training examples and are distinguished from the embedding vectors of the positive training examples in the feature space.
[0156] Through step S52, the computer system converts the integrated information sequence in the negative training examples into an embedded mapping implicit representation sequence. This process not only deepens the network's understanding of different lighting patterns, but also provides key data support for subsequent model debugging and optimization.
[0157] Step S53: determining the commonality measurement results between the embedding mapping implicit representation sequences corresponding to each training example in the positive training example binary group, and obtaining the commonality measurement results corresponding to the positive training example binary group.
[0158] Commonality measurement is a quantitative indicator used to evaluate the similarity or consistency between different data sequences. In the context of active training examples, commonality measurement can reflect the continuity or periodicity of the changes in the light data in different time intervals. Common commonality measurement methods include cosine similarity, Pearson correlation coefficient, dynamic time warping (DTW), etc. The computer system first traverses each pair of training examples in the active training example binary group. For each pair of training examples, they each correspond to an embedding mapping implicit representation sequence. Then, the system uses the selected commonality measurement method to calculate the commonality measurement result between the two sequences. Since the active training example binary group may contain multiple training example pairs, the computer will obtain multiple commonality measurement results. In order to obtain an overall commonality measurement result to represent the entire binary group, the computer system can use the average, median or other aggregation functions to summarize these results.
[0159] For example, assuming that the active training sample binary group contains two training samples A and B, which correspond to two lighting data of time intervals with intersection. Through step S51, the embedding mapping implicit representation sequence corresponding to the two training samples has been obtained:
[0160] The embedding map of training example A implicitly represents the sequence: {eA1, eA2, …, eAn};
[0161] The embedding map of training example B implicitly represents the sequence: {eB1, eB2, …, eBm};
[0162] Next, the computer system uses cosine similarity as a commonality measure to calculate the similarity between the two sequences. Assuming the calculated cosine similarity is 0.8, this means that the embedding mappings of training examples A and B implicitly represent that the sequences have a high similarity, reflecting the continuity of the changes in the light-on data in these two time intervals. If the active training example binary contains multiple training example pairs, the computer system will repeat the above calculation process and aggregate all the commonality measure results (such as taking the average) to obtain the commonality measure result of the entire binary.
[0163] Through step S53, the computer system can quantitatively evaluate the commonality or similarity between the implicit representation sequences of the embedding mappings corresponding to each training example in the positive training example binary. This process not only helps to understand the changing rules of the light data, but also provides important feedback information for subsequent network debugging and optimization.
[0164] Step S54: determining the commonality measurement results between the embedding mapping implicit representation sequences corresponding to each training example in the negative training example binary group, and obtaining the commonality measurement results corresponding to the negative training example binary group.
[0165] In step S54, the computer system aims to evaluate the differences or lack of commonality between the sequences of implicit representations of the embedding maps corresponding to each training example in the negative training example binary. Unlike step S53 which focuses on the commonality of the positive training examples, this step focuses on identifying the differences between the negative training examples.
[0166] In the context of negative training examples, the commonality measure no longer directly reflects similarity, but is used to quantify the difference or discrimination between different sequences. Therefore, the computer system may adopt a measurement method similar to step S53 (such as cosine similarity, Pearson correlation coefficient, etc.), but here, a lower commonality measure value (i.e., a larger difference) will be regarded as a positive result. For each pair of training examples in the negative training example binary group, the computer system first obtains their respective corresponding embedding mapping implicit representation sequences. Then, the difference value between the two sequences is calculated using the selected commonality measure method. Since negative training examples usually represent different lighting modes or conditions, it is expected that their embedding mapping implicit representation sequences have lower commonality measure results. Similar to step S53, the computer system aggregates the commonality measure results of all training example pairs in the negative training example binary group to obtain an overall difference measure result. This can be achieved by calculating the average, median or other statistics of all difference values. However, unlike the positive training examples, the aggregation result here will be used to evaluate the overall discrimination between the negative training examples.
[0167] For example, assuming that the negative training sample binary group contains two training samples C and D, which correspond to two light-on data of time intervals that do not have intersections. Through step S52, the embedding mapping implicit representation sequence corresponding to the two training samples has been obtained:
[0168] The embedding map of training example C implicitly represents the sequence: {eC1, eC2, …, eCn};
[0169] The embedding map of training example D implicitly represents the sequence: {eD1, eD2, …, eDm};
[0170] To quantify the difference between the two sequences, a computer system can use the inverse of the cosine similarity (or other appropriate difference measure) to calculate the difference between them. However, a more direct approach is to use a measure that directly reflects the difference, such as the square of the Euclidean distance:
[0171] ;
[0172] Assume that the calculated squared Euclidean distance value is a relatively large number (indicating significant differences between sequences), which reflects that the lighting data patterns of training examples C and D have a large degree of distinction in the feature space after embedding mapping. If the negative training example binary contains multiple training example pairs, the computer system will repeat the above calculation process and aggregate all the obtained difference measurement results (such as taking the average) to obtain the difference measurement result of the entire binary. This result will be used in the subsequent network debugging and optimization process to ensure that the neural network can learn to effectively distinguish between different lighting patterns.
[0173] Through step S54, the computer system quantifies the differences between the implicit representation sequences of the embedding mappings corresponding to each training example in the negative training example binary. This process is of great significance for improving the discrimination ability and generalization performance of the neural network in the intelligent recognition scenario of street lamps based on the Internet of Things. By ensuring that the negative training examples have sufficient discrimination in the feature space, the neural network can better distinguish different lighting modes and make more accurate detections.
[0174] Step S55: Debugging the embedding mapping neural network based on the commonality measurement results corresponding to the positive training example binary groups and the commonality measurement results corresponding to the negative training example binary groups.
[0175] In order to quantify the difference between the network detection and the actual data and guide the adjustment of the network parameters accordingly, the computer system first defines a loss function. In this scenario, the design of the loss function considers the commonality measurement results of the positive training examples and the negative training examples. One possible method is to design a composite loss function that considers two factors at the same time: one is the commonality (i.e. similarity) between the positive training examples, and the other is the difference between the negative training examples.
[0176] For example, one could define a loss function that includes two terms: one is the negative log-likelihood of a measure of commonality among the positive training examples (encouraging commonality), and the other is an exponential function of a measure of commonality among the negative training examples (penalizing commonality, i.e., encouraging diversity). However, it may be more common to use a more direct measure, such as incorporating the measure of commonality directly into the loss function, or indirectly influencing the loss function through other mechanisms such as regularization terms.
[0177] After the loss function is defined, the computer system will use an optimization algorithm (such as gradient descent, Adam, etc.) to minimize the loss function. During the optimization process, the computer will calculate the gradient of the loss function with respect to the network parameters and update the network parameters based on the gradient information. This step will be repeated for multiple iterations until the loss function value is reduced to an acceptable level or the preset number of iterations is reached.
[0178] During the tuning process, the computer system ensures that the effects of positive and negative training examples on the tuning of network parameters are balanced. This is usually achieved by adjusting the weights of the terms in the loss function. For example, if the commonality measure of the positive training examples is already high, but the difference measure of the negative training examples is not ideal, then the weight of the negative example term can be increased in the loss function so that more attention is paid to the difference of the negative examples during the optimization process.
[0179] For example, suppose that we have obtained the commonality measurement results corresponding to the positive training example binary and the negative training example binary. To simplify the explanation, we can assume that the commonality measurement results of the positive training examples have been converted into a loss term (encouraging commonality) in some way, and the commonality measurement results of the negative training examples (actually the difference measurement results) have also been converted into another loss term (penalizing commonality, that is, encouraging difference). The loss function may be similar to the following form:
[0180]
[0181] in, is the loss term calculated based on the commonality measurement results of the active training examples, is the loss term calculated based on the difference measurement results of negative training examples (note that this is actually the reverse application of the commonality measurement results), is a hyperparameter used to balance the impact of the two losses. During the optimization process, the computer calculates the gradient of this composite loss function with respect to the network parameters and uses an optimization algorithm (such as Adam) to update the network parameters. Through multiple iterations, the network will gradually learn how to increase the differences between negative training examples while maintaining the commonality of positive training examples, thereby improving its performance in the intelligent recognition task of street lights in vehicle-road cooperative systems.
[0182] Through step S55, the computer system can debug the embedding mapping neural network based on the commonality measurement results of the positive training examples and the negative training examples. This process involves defining the loss function, adjusting the network parameters, and balancing the impact of different examples on the loss function. By continuously optimizing the network parameters to minimize the loss function value, the computer system can train a neural network model that performs well in the intelligent recognition scenario of vehicle-road cooperative street lights.
[0183] As an implementation scheme, the step S55, based on the commonality measurement results corresponding to the positive training sample binary and the commonality measurement results corresponding to the negative training sample binary, debugging the embedding mapping neural network specifically includes:
[0184] Step S551: performing a first preset calculation on the commonality measurement results respectively corresponding to a plurality of active training example binary groups to obtain a first calculated commonality measurement result;
[0185] Step S552: performing the first preset calculation on the commonality measurement results respectively corresponding to the plurality of negative training example binary groups to obtain a second calculated commonality measurement result;
[0186] Step S553: Debugging the embedding mapping neural network according to the error between the first calculated commonality measurement result and the second calculated commonality measurement result.
[0187] In step S551, the computer system summarizes the commonality measurement results corresponding to the multiple positive training example pairs. The commonality measurement results reflect the similarity or continuity of the light-on data in different time intervals in the positive training examples, and are key indicators for evaluating the network's ability to learn positive patterns.
[0188] First, the computer system traverses all active training example pairs, and for each pair of training examples in each pair, uses a predefined commonality measurement method (such as cosine similarity, Pearson correlation coefficient, etc.) to calculate the commonality measurement results between their corresponding embedding mapping implicit representation sequences. These results constitute a set of commonality measurement values.
[0189] Next, the computer system performs the first preset calculation on these commonality measurement results, that is, a certain summary method (such as addition, averaging, etc.) is used to obtain a comprehensive commonality measurement result, which is called the first calculated commonality measurement result. The purpose of this result is to quantify the overall performance of all positive training sample tuples in commonality. Suppose there are three positive training sample tuples, each containing two training samples. For the first tuple, its commonality measurement result is 0.8; the second tuple is 0.75; and the third tuple is 0.85. If averaging is selected as the first preset calculation method, the first calculated commonality measurement result will be 0.8. This result reflects the average level of commonality of all positive training samples and is an important indicator for measuring the ability of the network to learn positive patterns.
[0190] Step S552 is similar to step S551, but in this step, the computer system processes the commonality measurement results of the negative training sample binary. The commonality measurement results of the negative training sample reflect the difference or independence of the lighting data in different time intervals, which is a key indicator for evaluating the network's ability to distinguish different lighting patterns.
[0191] The computer system traverses all negative training sample tuples, and for each pair of training samples in each tuple, uses the same commonality measurement method as the positive training samples to calculate the commonality measurement results between their corresponding embedded mapping implicit representation sequences. Since the negative training samples represent different lighting modes, it is expected that their commonality measurement results are low. Similar to step S551, the computer system performs a first preset calculation on these commonality measurement results to obtain a comprehensive commonality measurement result, which is called the second calculated commonality measurement result. The purpose of this result is to quantify the overall performance of all negative training sample tuples in terms of differences. Assuming that there are also three negative training sample tuples, the commonality measurement results of each tuple are 0.3, 0.25 and 0.35 respectively. If averaging is still selected as the first preset calculation method, the second calculated commonality measurement result will be 0.3. This result reflects the average level of differences among all negative training samples, and is an important indicator for measuring the ability of the network to distinguish different lighting modes.
[0192] In step S553, the computer system uses the first calculation commonality measurement result and the second calculation commonality measurement result obtained by the previous two steps to debug the embedding mapping neural network. The purpose of debugging is to reduce the error between the two calculation results by adjusting the network parameters, thereby improving the network's ability to distinguish between positive and negative modes. First, the computer system calculates the error between the first calculation commonality measurement result and the second calculation commonality measurement result. This error reflects the network's inadequacy in simultaneously learning positive modes and distinguishing negative modes. The larger the error, the more unbalanced the network's performance in these two aspects. In order to guide the debugging process of the network, the computer system designs a loss function that should be able to reflect the size of the above error. One possible design is to use the error directly as part of the loss function, or to combine the error with other types of losses (such as detection errors) to form a composite loss function. With the loss function, the computer system can apply optimization algorithms (such as gradient descent, Adam, etc.) to minimize the loss function value. During the optimization process, the computer will update the network parameters according to the gradient of the loss function with respect to the network parameters, thereby gradually reducing the error and improving the network performance. The above debugging process will be repeated for multiple iterations until the loss function value is reduced to an acceptable level or the preset number of iterations is reached. In each iteration, the computer system will recalculate the commonality measurement results, errors and loss function values, and update the network parameters according to the new loss function gradient.
[0193] Suppose a simple loss function is defined, which consists of two parts: one is the detection error (omitted here for simplicity), and the other is the commonality measurement error, which is the weighted sum of the difference between the first calculated commonality measurement result and the ideal positive commonality measurement result (assuming it is 1, indicating complete commonality) and the second calculated commonality measurement result (the weight can be adjusted according to the actual situation)
[0194] During the debugging process, the computer system continuously adjusts the network parameters through the optimization algorithm to reduce the value of this loss function. As the iteration proceeds, the first calculated commonality measurement result may gradually approach 1 (such as increasing to 0.9), and the second calculated commonality measurement result may further decrease (such as decreasing to 0.2). In this way, the loss function value will also decrease accordingly, indicating that the network's ability to simultaneously learn positive patterns and distinguish negative patterns has been improved. Through the detailed analysis and examples of step S55, we can see how to use the commonality measurement results of positive training samples and negative training samples to debug the embedding mapping neural network. This process not only improves the network's ability to distinguish between positive and negative patterns, but also provides a more accurate and robust detection model for the subsequent vehicle-road cooperative street light intelligent recognition task.
[0195] As another implementation scheme, the step S55, based on the commonality measurement results corresponding to the positive training sample binary and the commonality measurement results corresponding to the negative training sample binary, debugging the embedding mapping neural network specifically includes:
[0196] Step S55a: analyzing the concentration of the commonality measurement results corresponding to the plurality of active training example binary groups, to obtain a first analysis result;
[0197] Step S55b: analyzing the concentration of the commonality measurement results corresponding to the plurality of negative training example binary groups, to obtain a second analysis result;
[0198] Step S55c: Debugging the embedding mapping neural network according to the first analysis result and the second analysis result.
[0199] In step S55a, the computer system performs a concentration analysis on the commonality measurement results in multiple active training sample binary groups. Concentration is an indicator to measure the compactness of data distribution, which is usually obtained by calculating the variance, standard deviation or coefficient of variation of the data. For the commonality measurement results, low concentration (i.e., small variance, small standard deviation or small coefficient of variation) means that the commonality measurement results between different binary groups are more concentrated and have smaller differences, which reflects the stability of the network in active pattern recognition. First, the computer system collects the commonality measurement results of all active training sample binary groups. These results may be obtained by calculating the cosine similarity, Pearson correlation coefficient or other commonality measurement methods between the implicit representation sequences of each pair of training sample embedding mappings.
[0200] Next, the computer system calculates the variance, standard deviation, or coefficient of variation of these commonality measurement results. Finally, the computer system uses the obtained variance (or other concentration index) as the first analysis result. The smaller this value is, the more concentrated the distribution of commonality measurement results of the positive training example binary groups is, and the more stable the network is in identifying positive patterns.
[0201] Suppose there are three positive training example pairs, and their commonality measurement results are 0.80, 0.81, and 0.82 respectively. Calculating the average of these results, we get μ = 0.81, and the variance is 0.000333. Since the variance is very small, it means that the commonality measurement results of these three positive training example pairs are very concentrated, and the network shows high stability in identifying these positive patterns.
[0202] Step S55b is similar to step S55a, but this step is for negative training example tuples. The task of the computer system is to perform a concentration analysis on the commonality measurement results of these tuples to evaluate the network's ability to distinguish different negative patterns. Unlike positive patterns, negative patterns should have greater differences, so it is expected that their commonality measurement results are more dispersed. Similar to step S55a, but the data comes from negative training example tuples. The purpose of the concentration analysis is to evaluate whether the network can effectively identify the differences between these negative patterns.
[0203] In step S55c, the computer system will debug the embedding mapping neural network according to the first analysis result (the concentration of the commonality measurement results of the positive training sample dyads) and the second analysis result (the concentration of the commonality measurement results of the negative training sample dyads). The purpose of debugging is to optimize these two results by adjusting the network parameters so that the network can improve the ability to distinguish the differences of the negative patterns while maintaining the stability of the positive pattern recognition.
[0204] In order to incorporate the results of the concentration analysis into the network debugging process, the computer system designs a loss function that can reflect the results of these two analyses. One possible design is to use concentration as part of the loss function to guide the adjustment of network parameters by penalizing situations where the concentration is too high (for negative mode) or too low (for positive mode). With the loss function, the computer system can apply an optimization algorithm to minimize the loss function value. During the optimization process, the computer will update the network parameters according to the gradient of the loss function with respect to the network parameters, thereby gradually optimizing the results of the concentration analysis and improving network performance. The debugging process will be repeated for multiple iterations until the loss function value is reduced to an acceptable level or the preset number of iterations is reached. In each iteration, the computer system will recalculate the commonality measurement results, the concentration analysis results, and the loss function value, and update the network parameters according to the new loss function gradient.
[0205] Assume that a simplified loss function consists of two parts: one part reflects the concentration (variance) of the commonality measurement results of the positive patterns, and the other part reflects the concentration of the commonality measurement results of the negative patterns (also expressed as variance, but expected to be larger to reflect differences). In order to balance the two parts of the loss, different weights can be assigned to them, and the concentration values can be transformed (such as taking the inverse) to match the direction of the loss function reduction. However, in practical applications, more complex loss functions and more sophisticated debugging strategies may be preferred. In practical applications, the loss function can be more finely designed and adjusted. During the debugging process, the computer will optimize the network parameters according to this loss function. As the iterations proceed, the variance of the commonality measurement results of the positive patterns may gradually decrease (the concentration increases), while the variance of the commonality measurement results of the negative patterns may remain at a certain level or increase slightly (to reflect differences), so that the overall loss function value gradually decreases.
[0206] By analyzing the concentration of the commonality measurement results of the positive training examples and the negative training examples, and debugging the embedding mapping neural network accordingly, the performance of the network in identifying positive patterns and distinguishing negative patterns can be effectively improved. This method not only considers the numerical size of the commonality measurement results, but also pays attention to their distribution, providing a more comprehensive perspective for network optimization.
[0207] As an implementation scheme, the estimated lighting information timing set is obtained based on a debugged timing set estimation neural network, and the debugging process of the timing set estimation neural network includes:
[0208] Step S1: obtaining a training lighting information time series set; the training sample lighting information time series set includes lighting information of the target number of lights to be lit at each past moment in the first past time interval, and each lighting information in the training sample lighting information time series set is arranged according to the order of the respective past moments;
[0209] Step S2: Integrate each piece of lighting information in the training sample lighting information time series set with the semantic implicit representation of the corresponding priori label to obtain integrated information, and generate a training integrated information time series set;
[0210] Step S3: embedding and mapping the training sample integrated information sequence according to the debugged embedding mapping neural network to generate a training embedding mapping implicit representation time series set;
[0211] Step S4: embedding the training sample into the implicitly represented sequence of the mapping into the time series set estimation neural network to be debugged, estimating the lighting information of the target number of lights to be lit at each past moment in the second past time interval, and generating an estimated time series set;
[0212] Step S5: Based on the estimated timing set and the lighting information timing set mark, debug the timing set estimation neural network.
[0213] Before debugging the time series set estimation neural network, the computer system first obtains a training light-on information time series set, which contains the light-on information of the target number of lights to be on at each past moment in the first past time interval, and the information is arranged in chronological order.
[0214] Suppose you want to detect the lighting status of street lights on a certain road in the next week (the second past time interval). First, collect the number of lights on this road every night in the past month (the first past time interval) as training data. These data may come from real-time monitoring and recording of IoT devices (such as vehicle-mounted cameras, GPS locators, etc.), and after processing, form an ordered time series set of lighting information. For example, the training lighting information time series set may contain the following data items: {(2024-07-01,75),(2024-07-02,78),…,(2024-07-31,82)}; each tuple represents a time point (date) and the number of lights on at that time point.
[0215] After obtaining the training light-on information time series set, the computer system integrates each light-on information with the corresponding prior label semantic implicit representation to generate a training integrated information time series set. This process aims to combine actual observation data with prior knowledge to provide richer and more comprehensive information for subsequent neural network training. For each light-on information item in the training light-on information time series set, the computer system looks up its corresponding prior label (such as "stable quantity", "increasing quantity", etc.), and uses a pre-trained word embedding model or a custom feature extraction method to convert these labels into semantic implicit representation vectors. These vectors are then concatenated or fused with the number of lights on (which can be numerically embedded first) to generate integrated information.
[0216] Assume that the number of lights on at a certain point in time is 80, and its corresponding prior label is "stable number". The semantic implicit representation vector of this label is v 稳定 =[0.1,0.0,−0.1,…]. Then, the integrated information may be [80,0.1,0.0,−0.1,…] (the dimension of the vector is simplified here to save space). After performing this operation on each element in the training light information time series set, the training integrated information time series set can be generated.
[0217] After generating the training integrated information time series set, the computer system uses the debugged embedding mapping neural network to perform embedding mapping processing on the integrated information. The purpose of this step is to convert the integrated information into an implicit representation in a higher-dimensional or lower-dimensional space so that the subsequent time series set estimation neural network can better capture the intrinsic characteristics and time dependencies of the data. Each integrated information item in the training integrated information time series set is input into the embedding mapping neural network in turn. The network calculates the embedding mapping implicit representation of each integrated information through its internal structure and parameters, and arranges these representations in chronological order to generate a training embedding mapping implicit representation time series set.
[0218] Assume that the embedding mapping neural network is an LSTM network. For each integrated information item in the training integrated information time series set (such as [80,v 稳定 ]), the LSTM network will read these information items in turn and generate the corresponding embedding map implicit representation vectors through its internal state update mechanism (the internal calculation details of LSTM will not be expanded here). Finally, all embedding map implicit representation vectors are arranged in chronological order to form a training embedding map implicit representation time series set.
[0219] After obtaining the implicit representation time series set of the training embedding mapping, the computer system loads it into the time series set estimation neural network to be debugged to estimate the number of target lights that should be on at each past moment in the second past time interval. This process is the key step for the neural network to perform forward propagation and output the detection results.
[0220] The time series set estimation neural network to be debugged may be an RNN, LSTM, GRU or other neural network models suitable for processing time series data. The computer system passes the training embedding mapping implicit representation time series set as input to the network and allows it to perform forward propagation calculations. The network generates an estimated sequence of the number of lights on based on the input data and its own parameters, that is, the estimated time series set.
[0221] Assume that the time series set estimation neural network is an LSTM network. When the training embedding mapping implicit representation time series set is passed as input to the LSTM network, the network processes each embedding mapping implicit representation vector in turn and generates the corresponding number of detected lights through its internal state transfer mechanism. Finally, all estimated numbers of lights are arranged in chronological order to form an estimated time series set.
[0222] Finally, the computer system calculates the loss function value based on the estimated timing set and the actual lighting information timing set mark, and adjusts the network parameters through the back propagation algorithm to minimize the loss function value. This process will be repeated for multiple iterations until the stopping condition is met (such as the loss function value is less than a certain threshold or the preset number of iterations is reached).
[0223] During the debugging process, the computer system defines a suitable loss function to evaluate the difference between the estimated timing set and the actual lighting information timing set. Commonly used loss functions include mean square error (MSE), mean absolute error (MAE), etc. These loss functions can quantify the degree of deviation between the estimated results and the actual results, and provide guidance for the adjustment of network parameters.
[0224] In each iteration, the computer system calculates the gradient of the network parameters based on the loss function value and propagates these gradients back to each layer of the network through the back-propagation algorithm. Then, the network parameters (such as weights and biases) are updated based on the gradient information to reduce the loss function value. This process is repeated until the stopping condition is met.
[0225] Assume that there is a large deviation between the detection results of the time series set estimation neural network and the actual results in the initial state. After calculating the MSE loss function value and adjusting the network parameters using the back propagation algorithm, the accuracy of the estimation results gradually improves. As the number of iterations increases, the MSE value gradually decreases until it converges to a lower level. At this point, it can be considered that the network has been fully trained and can be used in actual light detection tasks.
[0226] Figure 2 A hardware entity diagram of a computer system provided in an embodiment of the present application is shown in FIG. Figure 2As shown, the hardware entity of the computer system 1000 includes: a processor 1001 and a memory 1002, wherein the memory 1002 stores a computer program that can be run on the processor 1001, and the processor 1001 implements the steps in the method of any of the above embodiments when executing the program.
[0227] The above is only an implementation method of the present application, but the protection scope of the present application is not limited thereto. Any technician familiar with the technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application.
Claims
1. A method for intelligently identifying street lamps based on vehicle-road collaboration in the Internet of Things, characterized in that: The method comprises: Obtaining a time series set of past lighting information of the target number of lights that should be turned on; the time series set of past lighting information includes lighting information of the target number of lights that should be turned on at each past moment in multiple past moments, and each of the lighting information is arranged according to the sequence of the respective past moments; wherein the past lighting information is obtained through a street light status image captured by a vehicle camera, vehicle GPS positioning information, and street light GPS coordinate information; Obtaining a priori labels corresponding to each lighting information in the past lighting information time series set, wherein the priori labels are descriptive labels indicating the evolution of the number of lights that should be on for the target, and the moment representing the evolution in the descriptive label is located after the past moment of the lighting information corresponding to the priori label; Extracting the semantic implicit representation of each of the prior labels to obtain the semantic implicit representation of each of the prior labels; Integrate each piece of lighting information in the past lighting information time series set with the semantic implicit representation of the corresponding prior label to obtain integrated information, thereby obtaining a past integrated information time series set; Based on the past integrated information time series set, the lighting information of the target number of lights to be lit at each analysis moment in a plurality of sequentially distributed analysis moments is estimated to obtain an estimated lighting information time series set; the analysis moment is located after each of the past moments.
2. The method according to claim 1, characterized in that The step of integrating each light-on information in the past light-on information time series set with the semantic implicit representation of the corresponding priori label to obtain integrated information and obtain the past integrated information time series set includes: For each light-on information in the past light-on information time series set, combining the light-on information with the semantic implicit representation of the corresponding priori label to obtain integrated information corresponding to each light-on information; According to the time sequence of the lighting information in the past lighting information time sequence set, the integrated information corresponding to each lighting information is arranged to generate a past integrated information time sequence set.
3. The method according to claim 2, characterized in that The method further comprises: Arranging the semantic implicit representations of the priori labels corresponding to the respective lighting information according to the timing sequence of the lighting information in the past lighting information timing sequence set, and generating a semantic implicit representation timing sequence set; For each light-on information in the past light-on information time series set, combining the light-on information with the semantic implicit representation of the corresponding priori label to obtain integrated information corresponding to each light-on information, including: The lighting information and the semantic implicit representation located at the same position in the past lighting information time series set and the semantic implicit representation time series set are combined to obtain integrated information corresponding to each lighting information.
4. The method according to claim 1, characterized in that The step of estimating the lighting information of the target number of lights to be lit at each analysis moment in a plurality of sequentially distributed analysis moments based on the past integrated information time series set to obtain the estimated lighting information time series set includes: According to the semantic implicit representation included in each integrated information in the past integrated information time series set, the past integrated information time series set is decomposed to obtain multiple segmented time series subsets; wherein the semantic implicit representation included in the integrated information in the same segmented time series subset is the same, and the semantic implicit representation included in the integrated information in two adjacent segmented time series subsets is different; According to the multiple segmented time series subsets, the lighting information of the target number of lights to be turned on at each analysis time in multiple sequentially distributed analysis times is estimated to obtain an estimated lighting information time series set.
5. The method according to claim 4, characterized in that The step of estimating the lighting information of the target number of lights to be lit at each analysis moment in a plurality of sequentially distributed analysis moments based on the plurality of segmented time sequence subsets to obtain an estimated lighting information time sequence set includes: Performing embedding mapping on the multiple segmented time sequence subsets respectively to obtain an embedded mapping implicit representation corresponding to each of the segmented time sequence subsets; Based on the embedded mapping implicit representations corresponding to each of the segmented time series subsets, generating an embedded mapping implicit representation sequence corresponding to the past lighting information time series set; According to the embedded mapping implicit representation sequence corresponding to the past lighting information time series set, the lighting information of the target number of lights to be turned on at each analysis moment in a plurality of sequentially distributed analysis moments is estimated to obtain an estimated lighting information time series set.
6. The method according to claim 5, characterized in that The embedding-mapping implicit representation is generated based on the debugged embedding-mapping neural network, and the debugging process of the embedding-mapping neural network includes: Obtaining a positive training example binary group, wherein the positive training example binary group includes training examples corresponding to the number of lights that the target should light up in a plurality of past time intervals having an intersection, wherein the training examples corresponding to the past time intervals include the lighting information of the number of lights that the target should light up at each past moment in the past time interval, and the lighting information in the training examples is arranged according to their respective order of precedence; Obtaining a negative training example binary group, wherein the negative training example binary group includes training examples corresponding to the number of target lights that should be on in a plurality of past time intervals that do not have an intersection; For each training example in the active training example binary group, each lighting information in the training example is respectively integrated with the semantic implicit representation of the corresponding prior label to obtain integrated information, and an integrated information sequence corresponding to each training example in the active training example binary group is generated; For each training example in the negative training example binary group, each light-on information in the training example is respectively integrated with the semantic implicit representation of the corresponding prior label to obtain integrated information, and an integrated information sequence corresponding to each training example in the negative training example binary group is generated; The embedding mapping neural network is debugged based on the integrated information sequence corresponding to each training example in the positive training example binary group and the integrated information sequence corresponding to each training example in the negative training example binary group.
7. The method according to claim 6, characterized in that The debugging of the embedding mapping neural network based on the integrated information sequence corresponding to each training example in the positive training example binary group and the integrated information sequence corresponding to each training example in the negative training example binary group includes: Loading the integrated information sequence corresponding to each training example in the active training example binary group into the embedding mapping neural network to embed multiple embedding mapping implicit representations, and obtaining the embedding mapping implicit representation sequence corresponding to each training example in the active training example binary group; Loading the integrated information sequence corresponding to each training example in the negative training example binary group into the embedding mapping neural network to embed multiple embedding mapping implicit representations, and obtaining the embedding mapping implicit representation sequence corresponding to each training example in the negative training example binary group; Determine the commonality measurement results between the embedding mapping implicit representation sequences corresponding to each training example in the active training example binary group, and obtain the commonality measurement results corresponding to the active training example binary group; Determine the commonality measurement result between the embedding mapping implicit representation sequences corresponding to each training sample in the negative training sample binary group, and obtain the commonality measurement result corresponding to the negative training sample binary group; The embedding mapping neural network is debugged based on the commonality measurement results corresponding to the positive training sample binary and the commonality measurement results corresponding to the negative training sample binary.
8. The method according to claim 7, characterized in that The debugging of the embedding mapping neural network based on the commonality measurement results corresponding to the positive training sample binary and the commonality measurement results corresponding to the negative training sample binary includes: Performing a first preset calculation on the commonality measurement results respectively corresponding to the plurality of active training sample binary groups to obtain a first calculated commonality measurement result; Performing the first preset calculation on the commonality measurement results respectively corresponding to a plurality of negative training example binary groups to obtain a second calculated commonality measurement result; Debugging the embedding mapping neural network according to an error between the first calculation commonality measurement result and the second calculation commonality measurement result; Alternatively, debugging the embedding mapping neural network based on the commonality measurement results corresponding to the positive training sample binary and the commonality measurement results corresponding to the negative training sample binary includes: Analyzing the concentration of commonality measurement results corresponding to a plurality of active training example binary groups, respectively, to obtain a first analysis result; Analyzing the concentration of the commonality measurement results corresponding to the plurality of negative training example binary groups, to obtain a second analysis result; The embedding mapping neural network is debugged according to the first analysis result and the second analysis result.
9. The method according to claim 1, characterized in that: The estimated lighting information timing set is obtained based on the debugged timing set estimation neural network, and the debugging process of the timing set estimation neural network includes: Acquire a training lighting information time series set; the training sample lighting information time series set includes lighting information of the target number of lights to be lit at each past moment in the first past time interval, and each lighting information in the training sample lighting information time series set is arranged according to the order of the respective past moments; Integrate each piece of lighting information in the training sample lighting information time series set with the semantic implicit representation of the corresponding priori label to obtain integrated information, and generate a training integrated information time series set; According to the debugged embedding mapping neural network, embedding mapping is performed on the training sample integrated information sequence to generate a training embedding mapping implicit representation time series set; The training sample embedding mapping implicit representation sequence is loaded into the timing set estimation neural network to be debugged, and the lighting information of the target number of lights to be lit at each past moment in the second past time interval is estimated to generate an estimated timing set; Based on the estimated timing set and the lighting information timing set mark, debug the timing set estimation neural network.
10. A computer system comprising a memory and a processor, wherein the memory stores a computer program executable on the processor, wherein: When the processor executes the program, the steps in the method according to any one of claims 1 to 9 are implemented.
Citation Information
Patent Citations
Intelligent remote wireless road lamp monitoring system and method
CN102905434A
Smart city management system
CN106056517A
Data processing method and system for smart city road lighting control
CN112532953A
Street lamp brightness control method and device and electronic equipment
CN117355010A