Data communication method, energy storage equipment and charging pile
By dividing the data to be transmitted into multiple groups according to priority and assigning different stack pressing cycles to each group of data, the packet loss problem caused by the simultaneous application of multiple packet data in timed data communication is solved, and efficient and orderly data transmission is achieved.
Patent Information
- Application Number
- CN202411878610.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-17
- Publication Date
- 2025-04-04
AI Technical Summary
When existing timed data communication technology applies for multiple packets of data to be sent at a certain point in time, it is easy to cause data packet loss.
By dividing the data to be transmitted into multiple groups based on the priority of the data, and each set of data has a different stacking cycle. The stacking cycle and priority of each set of data are negatively correlated. Each set of data is stacked and processed in time, and the data to be transmitted is sent according to the preset transmission cycle order.
It improves the transmission efficiency of priority data, improves the orderliness of data transmission, and effectively reduces the packet loss rate of data transmission.
Smart Images

Figure CN119766742A_ABST
Abstract
Description
Technical Field
[0001] The present application belongs to the field of information and communication technology, and in particular relates to a data communication method, energy storage equipment and charging pile. Background Art
[0002] Data communication refers to the process of exchanging data between two or more devices through a transmission medium (such as cables, optical fibers, radio waves, etc.). Among them, scheduled data communication technology sends data at fixed time intervals, which can facilitate data collection and subsequent analysis, and help maintain the stability of system monitoring.
[0003] Related scheduled data communication technologies divide different data into different transmission cycles for scheduled transmission. When multiple packets of data are requested to be sent at the same time near a certain time point, a certain degree of packet loss will be caused. Summary of the invention
[0004] The present application aims to solve at least one of the technical problems existing in the prior art. To this end, the present application proposes a data communication method, a data communication device, an energy storage device, a charging pile, a server, a computer-readable storage medium and a computer program product. It can improve the transmission efficiency of priority data, improve the orderliness of data transmission, and effectively reduce the packet loss rate of data transmission when multiple packets of data are simultaneously applied for transmission near a certain time point.
[0005] In a first aspect, the present application provides a data communication method, the method comprising:
[0006] Based on the priority of the data, multiple data to be transmitted are divided into multiple groups, and different stacking periods are assigned to each group of data, and the stacking period and priority of each group of data are negatively correlated;
[0007] Based on the stacking cycle of each group of data, stacking processing is performed on each group of data in a time-sharing manner to push the data to be transmitted into the stack;
[0008] The data to be transmitted in the stack are sequentially sent based on a preset sending cycle and the data order in the stack.
[0009] In a second aspect, the present application provides a data communication device, which includes a division module, a stacking module and a sending module. The division module is used to divide multiple data to be transmitted into multiple groups based on the priority of the data, and assign a different stacking cycle to each group of data, and the stacking cycle and priority of each group of data are negatively correlated; the stacking module is used to stack each group of data in a time-sharing manner based on the stacking cycle of each group of data, so as to push the data to be transmitted into the stack; the sending module is used to sequentially send the data to be transmitted in the stack based on a preset sending cycle and the data sorting in the stack.
[0010] In a third aspect, the present application provides an energy storage device, comprising:
[0011] A battery module, wherein the battery module is used to store and release electrical energy;
[0012] A battery management system, which is used to collect basic parameter information such as charging and discharging power, voltage, and current of the battery module, and the basic parameter information can be transmitted through the data communication method described in any of the above embodiments;
[0013] An inverter is used to convert the direct current of the battery module into alternating current for output. The information to be transmitted of the inverter includes at least one of fault information, power information, temperature information and functional information. The information to be transmitted of the inverter can be transmitted by the data communication method described in any of the above embodiments.
[0014] In a fourth aspect, the present application provides a charging pile, which is a device that provides electrical energy to electric vehicles and can output information to be transmitted of the charging pile; the information to be transmitted of the charging pile includes at least one of fault information, alarm information, power information and functional information, and the priorities of the fault information, alarm information, power information and functional information decrease in sequence; the information to be transmitted of the charging pile can be transmitted by the data communication method described in any of the above embodiments.
[0015] In a fifth aspect, the present application provides a server, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the data communication method described in any of the above embodiments when executing the program.
[0016] In a sixth aspect, the present application provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the data communication method described in any of the above embodiments.
[0017] In a seventh aspect, the present application provides a computer program product, including a computer program, which, when executed by a processor, implements the data communication method described in any of the above embodiments.
[0018] The data communication method, data communication device, energy storage equipment, charging pile, server, computer-readable storage medium and computer program product provided in the embodiments of the present application divide the data to be transmitted into multiple groups based on the different priorities of the data to be transmitted during scheduled data transmission, and assign a different push period to each group of data to be transmitted, and the push period and priority of each group of data are negatively correlated, thereby ensuring that data with high priority can be pushed first, thereby improving the sending efficiency of priority data and the orderliness of data transmission.
[0019] Moreover, different groups of data are stacked periodically, and then the stacked data packets are extracted sequentially for transmission, thereby effectively preventing the situation where multiple packets of data are requested to be sent at the same time near the same time point, thereby reducing the packet loss rate of data transmission.
[0020] Additional aspects and advantages of the embodiments of the present application will be given in part in the description below, and in part will become apparent from the description below, or will be learned through the practice of the embodiments of the present application. BRIEF DESCRIPTION OF THE DRAWINGS
[0021] The above and / or additional aspects and advantages of the present application will become apparent and easily understood from the description of the embodiments in conjunction with the following drawings, in which:
[0022] Figure 1 It is an application scenario diagram of the data communication method provided in the embodiment of the present application;
[0023] Figure 2 It is a first flow chart of the data communication method provided in an embodiment of the present application;
[0024] Figure 3 is a second flow chart of the data communication method provided in an embodiment of the present application;
[0025] Figure 4 is a third flow chart of the data communication method provided in an embodiment of the present application;
[0026] Figure 5 is a fourth flow chart of the data communication method provided in an embodiment of the present application;
[0027] Figure 6 is a fifth flow chart of the data communication method provided in an embodiment of the present application;
[0028] Figure 7 is a sixth flow chart of the data communication method provided in an embodiment of the present application;
[0029] Figure 8 It is a module schematic diagram of a data communication device provided in an embodiment of the present application;
[0030] Fig. 9 It is a schematic diagram of the structure of the server provided in the embodiment of the present application. DETAILED DESCRIPTION
[0031] The embodiments of the present application are described in detail below, and examples of the embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals throughout represent the same or similar elements or elements having the same or similar functions. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain the present application, and cannot be understood as limiting the present application.
[0032] For ease of understanding, the technical background and application scenarios of this application are first introduced below:
[0033] Scheduled data communication: refers to the exchange of data between devices according to certain protocols and rules at pre-set time intervals or specific time points.
[0034] Data to be transmitted: refers to data that has been determined to be sent from one location to another in a computer network communication environment or data storage system, but has not yet started to be transmitted or is in the process of being transmitted. Data to be transmitted can exist in the form of data packets.
[0035] Data packet: is the basic unit of data transmission in a network communication environment. The data to be transmitted is divided into smaller parts at the sending end, and then loaded into data packets. The data packets can be transmitted independently in the network and finally reassembled into the original data at the receiving end.
[0036] Packet loss: refers to the phenomenon that some data packets fail to be correctly transmitted from the sender to the receiver during the data communication process.
[0037] Priority: is a concept used to measure the relative importance or urgency of tasks, events, requests, etc. In communication networks, the priority of a data packet (a unit of data in network transmission) is used to determine its position in network bandwidth allocation and transmission order.
[0038] Stack: A special linear list that can only perform insertion and deletion operations at one end.
[0039] First-In-First-Out (FIFO) stack: It is a special data structure that combines the characteristics of a stack and a FIFO queue. It follows the first-in-first-out principle in operation, and the first data to enter is the first to be taken out.
[0040] Push: It is a basic operation in the stack data structure, which is the process of adding a new data element to the top of the stack.
[0041] A timer is a device or software component used to measure time intervals or generate timing signals. At the software level, a timer is a functional module in an operating system or application that is used to schedule tasks, control the frequency of events, etc.
[0042] IoT devices: refers to physical devices that can be connected to the Internet or other communication networks to realize data collection, transmission, processing and interaction functions.
[0043] See also Figure 1 , Figure 1 1 is an application scenario diagram of a data communication method provided in an embodiment of the present application. The application scenario provided in the present application includes a charging pile 100, an energy storage device 200 and a server 300.
[0044] Among them, the charging pile 100 is a device for replenishing electric energy for electric vehicles. The charging pile is connected to the server in communication and directly connected to the power grid. The charging pile can draw electricity from the power grid and then replenish electric energy for the electric vehicle. The charging pile can output information to be transmitted to the server to describe various states of the charging pile itself. The information to be transmitted of the charging pile includes at least one of fault information, alarm information, power information and function information. The priority of fault information, alarm information, power information and function information decreases in sequence.
[0045] Optionally, the charging pile 100 may be a DC or AC charging pile for replenishing electric energy for pure electric vehicles, hybrid electric vehicles, electric bicycles, etc. The charging pile may include an inverter, for example, the DC power of the electric vehicle is converted into AC power by the inverter of the DC charging pile and sent to the power grid.
[0046] The energy storage device 200 includes a battery module 210 , a battery management system 220 and an inverter 230 .
[0047] The energy storage device is connected to the server through communication and is directly connected to the power grid. The energy storage device can draw power from the power grid to provide power to the power load, or it can transmit power to the power grid.
[0048] The battery module 210 is a battery unit composed of a plurality of battery cells connected in series, in parallel or in series-parallel, and is used for storing and releasing electric energy.
[0049] The battery management system 220 is a system for comprehensively managing and monitoring the battery module (or battery pack). The battery management system 220 is used to detect parameter information such as voltage and current of the battery module.
[0050] The inverter 230 is a device that converts the direct current of the battery module into alternating current. The inverter can output information to be transmitted that describes its own state, and the information to be transmitted of the inverter includes at least one of fault information, power information, temperature information and function information.
[0051] Optionally, the inverter 230 may be a photovoltaic inverter, a vehicle-mounted inverter, an industrial inverter, or the like.
[0052] The server 300 is a device for performing high-performance data processing.
[0053] Optionally, the server 300 may be a terminal, and the terminal may include but is not limited to a smart phone (such as an Android phone, an IOS phone, etc., a tablet computer, a laptop computer, a desktop computer, a smart watch, a portable personal computer, a mobile Internet device (Mobile Internet Devices, MID for short), an intelligent voice interaction device, a smart home appliance, a vehicle-mounted terminal, a wearable device, etc., which is not limited in the embodiments of the present application.
[0054] Server 300 may be an independent physical server, or a server cluster or distributed system composed of multiple physical servers. It may also be a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, CDN (Content Delivery Network), and big data and artificial intelligence platforms, but the embodiments of the present application do not limit this.
[0055] In some embodiments, the electronic device of the present application may be at least one of a terminal and an Internet of Things device.
[0056] Based on the introduction of the above-mentioned related scenarios, the embodiment of the present application provides a data communication method, which is described in detail below:
[0057] See also Figure 2 A data communication method provided in an embodiment of the present application is implemented by step 011, step 012 and step 013, which are described in detail below.
[0058] Step 011: Based on the priority of the data, multiple data to be transmitted are divided into multiple groups, and different stacking periods are allocated to each group of data, and the stacking period and priority of each group of data are negatively correlated;
[0059] The push cycle is the time interval between the start of a push operation and the next push operation for a group of data.
[0060] Specifically, based on the priority of the data to be transmitted, a plurality of data to be transmitted are grouped, for example, data of different priorities are divided into different groups, and / or data of the same priority are divided into different groups.
[0061] After the data grouping is completed, each group of data that has been allocated is assigned a respective stacking cycle according to its priority. The higher the priority of each group of data, the shorter the stacking cycle.
[0062] Optionally, the priority of the data to be transmitted is determined based on at least one of the following information:
[0063] (1) The frequency of use of the data to be transmitted;
[0064] (2) preset priority of the data to be transmitted;
[0065] (3) Real-time indicators of the data to be transmitted.
[0066] The frequency of data usage refers to the number of times the data is accessed, processed or applied within a certain time frame. It is an important indicator for measuring the activity of data. For example, in an e-commerce platform, the sales data of a popular product may be viewed and analyzed many times a day to monitor sales trends, adjust inventory, etc., and its usage frequency is relatively high; while the relevant data of some outdated products may be rarely used, and the usage frequency is very low. In this way, the priority of the sales data of this product can be set higher than the priority of the relevant data of other products.
[0067] The preset priority of data refers to the classification of importance and processing order set in advance for different data in the data management and processing system according to various attributes of the data and business needs. For example, in the financial transaction system, the scheduled sending tasks involving data on large transaction confirmation and user account security (such as password modification, fund transfer authorization, etc.) should have the highest preset priority, because the timeliness and accuracy of this data are directly related to the user's fund security and the legality of the transaction.
[0068] The real-time index of data is a standard used to describe the timely update and rapid arrival of data within a specific time frame. For example, in a medical emergency dispatch system, the ambulance location update data is sent regularly. Every minute of delay may affect the effect of emergency treatment, so the sending task of this type of data has a very high priority.
[0069] In this way, the priority of the data to be transmitted is determined based on at least one of its usage frequency, preset priority, and real-time index, ensuring that the data to be transmitted with high priority can be pushed first, thereby ensuring that important data can be sent out in a timely and accurate manner.
[0070] Optionally, the data to be transmitted includes at least one of fault information, alarm information, power information and function information, and the priorities of the fault information, alarm information, power information and function information are reduced in sequence.
[0071] Fault information refers to a series of related data and descriptions generated when an abnormality or fault occurs during the operation of a system, device, software or process. For example, when an IoT device fails during operation, relevant fault information is generated inside the IoT device.
[0072] Among them, alarm information is a message used to indicate abnormal, dangerous or potentially threatening situations. It can be generated after the monitoring system of the IoT device detects a specific trigger condition.
[0073] Among them, power information refers to a detailed description of how fast an object does work, converts or transfers energy per unit time. It can be a detailed description of the energy consumed or output per unit time during the energy conversion process of the IoT device.
[0074] Among them, functional information is a detailed description of the capabilities and functions of an object (such as a system, device, product, etc.). For example, an electric vehicle charging station can be in regular charging mode or fast charging mode.
[0075] Based on the importance of the fault information, alarm information, power information and function information, the priorities of the fault information, alarm information, power information and function information decrease in sequence.
[0076] For example, industrial production equipment needs to transmit a variety of data to the terminal at regular intervals, including fault information, alarm information, and power information. Based on production needs, the preset priority is that fault information is the highest, alarm information is the second, and power information is the lowest. Fault information, alarm information, and power information are divided into a group respectively, and then three push cycles of large, medium, and small are allocated. The fault information group data is allocated a small push cycle, the alarm information group data is allocated a medium push cycle, and the power information group data is allocated a large push cycle. Ensure that the stacking priority of the fault information group data is higher than that of the alarm information group data, and the stacking priority of the alarm information group data is higher than that of the power information group data.
[0077] In this way, by grouping the data to be transmitted of different priorities and allocating a stacking period that is negatively correlated with the priority, the data to be transmitted of high priority can be stacked first, thereby improving the transmission efficiency of the priority data.
[0078] Step 012: Based on the stacking cycle of each group of data, stacking processing is performed on each group of data in a time-sharing manner to push the data to be transmitted into the stack;
[0079] The stack push process refers to the operation of pushing the data required to be pushed into the stack into the stack.
[0080] Specifically, when the time interval between each group of data and the last stacking process has reached the corresponding stacking period, the stacking process is entered again to push each group of data to be transmitted into the stack.
[0081] For example, the push cycle of fault information is 50ms. 50ms after the last fault information group data entered the push process, the fault information group data enters the push process again for push; the push cycle of power information is 200ms. 200ms after the last power information group data entered the push process, the power information group data enters the push process again for push.
[0082] Optionally, a timer may be set for each group of data, and the timing duration of the timer is the stacking duration of the corresponding group, thereby triggering the stacking process of each group of data.
[0083] In this way, every other push cycle of the target group data, the data to be transmitted in the target group data is pushed into the stack, and the data information regularly collected by the IoT device is periodically pushed into the stack, which can ensure the timeliness of data transmission.
[0084] Step 013: Based on a preset sending cycle and the order of data in the stack, the data to be transmitted in the stack is sent sequentially.
[0085] The preset sending period refers to the interval period between two adjacent data transmissions. For example, in scenarios such as information dissemination and data transmission, data is sent every predetermined sending interval period.
[0086] Specifically, based on a preset sending cycle set inside the IoT device, sequentially sorted data to be transmitted is extracted from the stack at intervals of a preset sending cycle, and the data that enters first is taken out first and then sent.
[0087] For example, the preset sending cycle of the data of the car charging pile is preset to 5ms, and the first data to be transmitted pushed into the stack is extracted every 5ms. If the fault information data is in the front of the stack and the alarm information data is followed, the fault information data is extracted and sent in sequence first, and then the alarm information data is extracted and sent after the preset sending cycle.
[0088] In this way, the data to be transmitted in the stack is extracted and sent regularly, which can improve the orderliness of data transmission, thereby effectively preventing the situation where multiple packets of data are applied for sending at the same time near the same time point, and reducing the packet loss rate of data transmission.
[0089] The data communication method of the present application divides multiple data to be transmitted into multiple groups based on the priority of the data to be transmitted, allocates different stacking cycles to each group of data, performs stacking processing on each group of data in cycles, and then sequentially extracts the stacked data packets for transmission. This can improve the transmission efficiency of priority data, improve the orderliness of data transmission, effectively prevent the situation where multiple data packets are applied for transmission at the same time near the same time point, and reduce the packet loss rate of data transmission.
[0090] In some embodiments, the stacking periods of each group of data are in integer multiples; and / or, the stacking periods of each group of data are in non-integer multiples.
[0091] Specifically, a stack push cycle that is negatively correlated with the priority is allocated to each group of data, a small stack push cycle is allocated to data to be transmitted with a high priority, and a large stack push cycle is allocated to data to be transmitted with a low priority.
[0092] In some embodiments, the stacking periods of any two sets of data are in an integer multiple relationship; or, the stacking periods of any two sets of data are in a non-integer multiple relationship.
[0093] Optionally, stacking periods of any two sets of data are in integer multiple relationship.
[0094] When the push cycle of the low-priority data to be transmitted arrives, the push cycle of the high-priority data to be transmitted also arrives. In this way, the push process of the high-priority data to be transmitted is always performed first, and then the push process of the low-priority data to be transmitted is performed, thereby ensuring the sending efficiency of the high-priority data to be transmitted.
[0095] Optionally, the stacking periods of any two sets of data are in a non-integer multiple relationship.
[0096] When the push cycle of low-priority data to be transmitted arrives, the push cycle of high-priority data to be transmitted will not arrive, and they are staggered. Low-priority data to be transmitted can enter the push process without waiting for other push processes. When there are a lot of data to be transmitted, low-priority data to be transmitted can also be pushed into the stack and wait to be sent, so as to ensure the integrity of data transmission.
[0097] Optionally, among each group of data, the stacking periods of a portion of the data groups may be in an integer multiple relationship, while the stacking periods of another portion of the data groups may be in a non-integer multiple relationship.
[0098] The stacking period of one or more groups of data in all groups is an integer multiple relationship; and / or, the stacking period of one or more groups of data in all groups is a non-integer multiple relationship. This ensures the transmission efficiency of high-priority data to be transmitted and improves the integrity of data transmission.
[0099] For example, when an electric car is charging, the charging pile regularly transmits fault information, alarm information, power information and function information to the terminal platform, and the priority of fault information, alarm information, power information and function information decreases in sequence. The stacking cycle is allocated based on the priority relationship of various information. The stacking cycle of the fault information group data is 50ms, the stacking cycle of the alarm information group data is 100ms, the stacking cycle of the power information group data is 150ms, and the information of the function information group data is 200ms. Among them, the fault information group data is an integer multiple of any other group data. When the stacking cycle of any other group data arrives, the stacking cycle of the fault information group data also arrives, which ensures the priority of stacking and sending the fault information group data; the stacking cycle of the power information group data is not an integer multiple of the alarm information group data and the function information group data, so that the transmission efficiency of the power information group data is improved.
[0100] In this way, corresponding stacking periods are allocated to groups of data to be transmitted with different priorities, and the stacking periods of each group of data present different numerical relationships, which can improve the transmission efficiency of priority data and the integrity of data transmission.
[0101] See also Figure 3 Optionally, step 012 includes:
[0102] Step 0121: respectively determine whether the stacking interval length reaches the stacking period corresponding to the target group data, and the target group data includes at least one group of data in each group of data;
[0103] Specifically, after assigning corresponding push cycles to groups of data with different priorities, the internal clock times each group of data to be transmitted respectively, and when judging whether the push interval reaches the push cycle of the corresponding group of data, at least one group of data in the corresponding group of data is processed according to the judgment result.
[0104] Optionally, when the stacking interval duration does not reach the stacking period of the target group data, the target group data is not stacked, but the stacking process of the target group data is skipped and the stacking process of the group data whose interval duration reaches the stacking period is entered.
[0105] For example, when the push cycle of the power information group data of the IoT device that needs to be sent regularly is 100ms, a judgment must be made every 100ms between the time interval between the last push of the power information group data and the power information group data to determine whether to skip the push process of the power information group data or to perform subsequent processing on at least one group of data in the power information group data.
[0106] In this way, it is determined whether the stacking interval of each group of data exceeds a stacking cycle, and subsequent processes can be performed according to the determination result, thereby saving computing resources and improving transmission efficiency.
[0107] Step 0122: If yes, push the data to be transmitted in the target group data into the stack.
[0108] Specifically, when the stacking interval length of the target group data reaches the corresponding stacking period, at least one group of data in the target group data is pushed into the stack.
[0109] Optionally, when the stacking interval of the target group data reaches the corresponding stacking period, the data to be transmitted in the target group data can be pushed into the stack according to a preset number (such as one or more), or the number of data to be transmitted pushed into the stack can be dynamically adjusted based on the remaining space of the stack to improve data transmission efficiency.
[0110] For example, when the target group data push cycle is 100ms and the interval with the last push process is 100ms, one data to be transmitted is fixedly pushed into the stack, or based on the remaining space of the stack (space for three data to be transmitted), three data to be transmitted can be pushed into the stack.
[0111] In this way, pushing the data in the target group data into the stack can improve the orderliness of data transmission.
[0112] See also Figure 4 Optionally, step 0122 includes:
[0113] Step 01221: Based on the priorities of the multiple groups of target group data, the data to be transmitted in the multiple groups of target group data are pushed into the stack in sequence.
[0114] Specifically, when the interval length of multiple target group data reaches the corresponding stacking period, the target group data with the highest priority is pushed into the stack first, and then the target group data with lower priority than the highest priority but higher than other priorities is pushed into the stack. The priority level decreases in turn, and the corresponding target group data is pushed into the stack in sequence.
[0115] For example, the priorities of fault information, power information, and function information group data decrease in sequence. When the push time of the three reaches the push cycle, the fault information group data is pushed first. After the push process of the fault information group data is completed, the power information group data is pushed. After the push process of the power information group data is completed, the function information group data is pushed into the stack.
[0116] In this way, based on the priority of the target group data, multiple groups of target group data are pushed into the stack in sequence, which can improve the transmission efficiency of the priority data and enhance the orderliness of data transmission.
[0117] See also Figure 5 Optionally, step 012 further includes:
[0118] Step 0123: Determine whether the stack is full;
[0119] If not, then enter the step of pushing the data to be transmitted in the target group data onto the stack (i.e. step 01221);
[0120] If so, the process proceeds to the step of sequentially sending the data to be transmitted in the stack based on the preset sending cycle and the data order in the stack (ie, step 013 ).
[0121] Specifically, before pushing the to-be-transmitted data of the target group into the stack, it is necessary to determine whether there is any remaining space in the current stack.
[0122] For example, when pushing the data of fault information, alarm information and power information into the stack, it is necessary to determine whether there is any remaining space in the stack. When the alarm information group data is pushed into the stack, the fault information group data has already been pushed into the stack, and it is necessary to determine whether there is any free space in the current stack. If not, the stacking process is canceled and the sending step is entered; if there is any free space, the stacking process of the alarm information group data is executed. When the power information group data is pushed into the stack, it is necessary to determine whether the stack that has already pushed the fault information and alarm information group data still has any free space for pushing the power information group data. If not, the stacking process is canceled and the sending step is entered; if there is any free space, the stacking process of the power information group data is executed.
[0123] In this way, it is determined whether the stack is full. When the stack is not full, the target group data is pushed onto the stack. When the stack is full, the target group data is pushed onto the stack. This can improve the data transmission efficiency and avoid pushing the target group data onto the stack when the stack is full, thereby avoiding data packet loss caused by this.
[0124] See also Figure 6 In some embodiments, step 012 also includes step 0124, which is described in detail below.
[0125] Step 0124: When the stack is not full, determine whether each target group data is empty;
[0126] If not, then enter the step of pushing the data to be transmitted in the target group data onto the stack (i.e. step 01221);
[0127] If so, the process proceeds to the step of sequentially sending the data to be transmitted in the stack based on the preset sending cycle and the data order in the stack (ie, step 013 ).
[0128] Specifically, when the interval length of multiple target group data reaches the corresponding stack push cycle and there is still remaining space in the stack, it is determined whether the multiple target group data has data to be transmitted.
[0129] For example, when the push interval duration of the fault information, power information and function information group data reaches their respective corresponding push cycles, they are pushed in sequence according to priority. When each push process is reached, if the stack is not full, it is determined whether there is data to be transmitted in the fault information, power information and function information group data. If not, the push process is canceled and the sending step is entered; if there is data to be transmitted, the subsequent push process is executed.
[0130] In this way, when the stack is not full, judging whether each target group of data is empty can provide support for subsequent processes and enhance the efficiency of data transmission.
[0131] See also Figure 7 In some embodiments, step 0121 also includes step 0125, which is described in detail below.
[0132] Step 0125: Determine whether each target group data is empty;
[0133] If not, then enter the step of pushing the data to be transmitted in the target group data onto the stack (i.e. step 01221);
[0134] If so, the process proceeds to the step of sequentially sending the data to be transmitted in the stack based on the preset sending cycle and the data order in the stack (ie, step 013 ).
[0135] Specifically, whenever the interval length of the target group data reaches the corresponding stacking period, it is determined whether the target group data has data to be transmitted.
[0136] For example, when the stacking interval of the alarm information and power information group data reaches the corresponding stacking cycle, it is judged whether the group data of the fault information, power information and function information is empty. If the group data of each fault information, power information and function information is empty, the sending step is entered; if the fault information and power information group data are empty, and the function information group data is not empty, the function information group data is stacked.
[0137] In this way, when the stacking interval of each target group reaches its respective stacking period, subsequent processes are performed based on the judgment of whether the data of each target group is empty, which can reduce the packet loss rate and improve the data transmission efficiency.
[0138] According to the method described in the above embodiment, the present application embodiment also provides a data communication device 300 for executing the steps in the above data communication method. Figure 8 , Figure 8 : is a module diagram of a data communication device 300 provided in an embodiment of the present application. The data communication device 300 includes:
[0139] Division module 301: used for dividing a plurality of data to be transmitted into a plurality of groups based on the priority of the data, and assigning a different stacking period to each group of data, wherein the stacking period and the priority of each group of data are negatively correlated;
[0140] The stacking module 302 is used for stacking the data groups in a time-sharing manner based on the stacking cycle of the data groups, so as to push the data to be transmitted into the stack;
[0141] The sending module 303 is configured to sequentially send the data to be transmitted in the stack based on a preset sending cycle and the order of the data in the stack.
[0142] It should be noted that the specific details of each module unit in the above-mentioned data communication device have been described in detail in the embodiment of the above-mentioned data communication method, and will not be repeated here.
[0143] In the embodiments of the present application, the term "module" or "unit" refers to a computer program or a part of a computer program with a predetermined function, and works together with other related parts to achieve a predetermined goal, and can be implemented in whole or in part by using software, hardware (such as processing circuits or memories) or a combination thereof. Similarly, a processor (or multiple processors or memories) can be used to implement one or more modules or units. In addition, each module or unit can be part of an overall module or unit that includes the function of the module or unit.
[0144] In some embodiments, please refer to Figure 1 The embodiment of the present application provides an energy storage device 200, which includes a battery module 210, a battery management system 220 and an inverter 230. The battery module 210 is used to store and release electric energy; the basic parameter information of the battery module 210 such as charging and discharging power, voltage, current, etc. collected by the battery management system 220 can be transmitted through the data communication method of any of the above embodiments; the inverter 230 converts the direct current of the battery module 210 into alternating current for output, and the information to be transmitted of the inverter 210 includes at least one of fault information, power information, temperature information and functional information, and the information to be transmitted of the inverter 210 can be transmitted through the data communication method of any of the above embodiments.
[0145] In some embodiments, please refer to Figure 1 , the embodiment of the present application provides a charging pile 100. The charging pile 100 can output the information to be transmitted of the charging pile 100, and the information to be transmitted of the charging pile 100 includes at least one of fault information, alarm information, power information and function information. The priorities of the fault information, alarm information, power information and function information of the charging pile 100 decrease in sequence, and the information to be transmitted of the charging pile 100 can be transmitted by the data communication method of any of the above embodiments.
[0146] In some embodiments, the data communication device in the embodiments of the present application can be implemented in hardware, such as a server, or a component in a server, such as an integrated circuit or a chip; the data communication device can also be implemented in software, such as an application installed in a server. Fig. 9 , Fig. 9 4 is a schematic diagram of the structure of the server provided in the embodiment of the present application. The server 400 includes a processor 401 and a memory 402. The memory 402 stores a computer program 403 that can be run on the processor 401. When the program 403 is executed by the processor 401, each process of the embodiment of the above-mentioned data communication method is implemented, and the same technical effect can be achieved. To avoid repetition, it will not be repeated here.
[0147] An embodiment of the present application also provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the various processes of the embodiment of the above-mentioned function limitation method are implemented, and the same technical effect can be achieved. To avoid repetition, it will not be repeated here.
[0148] The processor may be a processor in the server in the above embodiment. The computer readable storage medium may be a computer read-only memory ROM, a random access memory RAM, a magnetic disk or an optical disk.
[0149] Computer readable media may include computer storage media and communication media. Computer storage media include volatile and non-volatile, removable and non-removable media implemented by any method or technology for storing information such as computer readable instructions, data structures, program modules or other data. Computer storage media include RAM, ROM, Erasable Programmable Read-Only Memory (EPROM), Electrically Erasable Programmable Read-Only Memory (EEPROM), flash memory or other solid-state memory technology, CD-ROM, Digital Versatile Disc (DVD) or other optical storage, cassettes, magnetic tapes, disk storage or other magnetic storage devices. Of course, those skilled in the art will know that computer storage media are not limited to the above.
[0150] The embodiment of the present application also provides a computer program product, including a computer program, which implements the above-mentioned data communication method when executed by a processor. The processor may be a processor in the electronic device in the above-mentioned embodiment. When the computer program is executed by the processor, each process of the embodiment of the above-mentioned data communication method is implemented, and the same technical effect can be achieved. To avoid repetition, it will not be repeated here.
[0151] It is understandable that in the specific implementation of this application, data related to user identity or characteristics is involved. When the above embodiments of this application are applied to specific products or technologies, user permission or consent is required, and the collection, use and processing of relevant data need to comply with relevant laws, regulations and standards of relevant countries and regions.
[0152] In the description of this specification, the descriptions with reference to the terms "certain embodiments", "in an example", "exemplarily", etc., mean that the specific features, structures, materials or characteristics described in conjunction with the embodiments or examples are included in at least one embodiment or example of the present application. In this specification, the schematic representations of the above terms do not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described may be combined in any one or more embodiments or examples in a suitable manner. In addition, those skilled in the art may combine and combine the different embodiments or examples described in this specification and the features of the different embodiments or examples, unless they are contradictory.
[0153] Any process or method description in a flowchart or otherwise described herein may be understood to represent a module, fragment or portion of code that includes one or more executable instructions for implementing the steps of a specific logical function or process, and the scope of the preferred embodiments of the present application includes alternative implementations in which functions may not be performed in the order shown or discussed, including performing functions in a substantially simultaneous manner or in the reverse order depending on the functions involved, which should be understood by technicians in the technical field to which the embodiments of the present application belong.
[0154] Although the embodiments of the present application have been shown and described, those skilled in the art will appreciate that various changes, modifications, substitutions and variations may be made to the embodiments without departing from the principles and spirit of the present application, and that the scope of the present application is defined by the claims and their equivalents.
Claims
1. A data communication method, characterized in that: The method comprises: Based on the priority of the data, multiple data to be transmitted are divided into multiple groups, and different stacking periods are assigned to each group of data, and the stacking period and priority of each group of data are negatively correlated; Based on the stacking cycle of each group of data, stacking processing is performed on each group of data in a time-sharing manner to push the data to be transmitted into the stack; The data to be transmitted in the stack are sequentially sent based on a preset sending cycle and the data order in the stack.
2. The data communication method according to claim 1, characterized in that: The priority of the data to be transmitted is determined based on at least one of the following: The usage frequency of the data to be transmitted; The preset priority of the data to be transmitted; The real-time indicator of the data to be transmitted.
3. The data communication method according to claim 1, characterized in that: The stacking periods of one or more groups of data in all the groups are in an integer multiple relationship; and / or, the stacking periods of one or more groups of data in all the groups are in a non-integer multiple relationship; or, the stacking periods of any two groups of data are in an integer multiple relationship; or, the stacking periods of any two groups of data are in a non-integer multiple relationship.
4. The data communication method according to claim 1, characterized in that: The stacking process of each group of data based on the stacking cycle of each group of data in time-sharing includes: respectively determining whether the stacking interval duration reaches the stacking period corresponding to the target group data, wherein the target group data includes at least one group of data among the groups of data; If so, push the data to be transmitted in the target group of data into the stack.
5. The data communication method according to claim 4, characterized in that: The target group data includes a plurality of groups, and the step of stacking the to-be-transmitted data in the target group data onto the stack includes: Based on the priorities of the multiple groups of target group data, the to-be-transmitted data in the multiple groups of target group data are sequentially pushed into the stack.
6. The data communication method according to claim 4 or 5, characterized in that: The stacking process of each group of data based on the stacking cycle of each group of data in time sharing also includes: Determining whether the stack is full; If not, entering the step of pushing the data to be transmitted in the target group data onto the stack; If so, the step of sequentially sending the data to be transmitted in the stack based on the preset sending cycle and the data sorting in the stack is entered.
7. The data communication method according to claim 6, characterized in that: The stacking process of each group of data based on the stacking cycle of each group of data in time sharing also includes: When the stack is not full, determining whether each group of the target group data is empty; If so, determine that the target group data has been pushed into the stack, and enter the step of sequentially sending the data to be transmitted in the stack based on the preset sending cycle and the data sorting in the stack; If not, the step of pushing the data to be transmitted in the target group of data onto the stack is entered.
8. The data communication method according to claim 4 or 5, characterized in that: The stacking process of each group of data based on the stacking cycle of each group of data in time sharing also includes: Determine whether each group of target group data is empty; If so, determine that the target group data has been pushed into the stack, and enter the step of sequentially sending the data to be transmitted in the stack based on the preset sending cycle and the data sorting in the stack; If not, the step of pushing the data to be transmitted in the target group of data onto the stack is entered.
9. An energy storage device, characterized in that: include: A battery module, wherein the battery module is used to store and release electrical energy; A battery management system, the battery management system is used to collect basic parameter information such as charging and discharging power, voltage, current, etc. of the battery module, and the basic parameter information can be transmitted through the data communication method according to any one of claims 1 to 8; An inverter, wherein the inverter is used to convert the direct current of the battery module into alternating current for output, the information to be transmitted of the inverter includes at least one of fault information, power information, temperature information and functional information, and the information to be transmitted of the inverter can be transmitted by the data communication method described in any one of claims 1-8.
10. A charging pile, characterized in that: include: The charging pile is a device that provides electric energy for electric vehicles and can output the information to be transmitted from the charging pile; The information to be transmitted of the charging pile includes at least one of fault information, alarm information, power information and function information, and the priorities of the fault information, alarm information, power information and function information decrease in sequence; the information to be transmitted of the charging pile can be transmitted by the data communication method described in any one of claims 1-8.
Citation Information
Patent Citations
Family coaxial network MAC layer data transmission method based on service differentiation
CN101783758A
Pre-hospital emergency end, pre-hospital emergency system and data transmission method of pre-hospital emergency end
CN103138886A
Communication method and device of air conditioner
CN106338128A
Message transmission method, message transmission device, electronic equipment and storage medium
CN114567603A
Multi-message processing method and system based on PLC, storage medium and PLC
CN117452870A