Simulation apparatus, method, terminal device, and medium for a battery system

By introducing a simulation server between the battery system and the mobile terminal to simulate the battery system's operating data, the problem of strong hardware dependence is solved, the efficiency of joint debugging and testing and the development of new functions is improved, and the complexity and cost of hardware updates are reduced.

CN116599884BActive Publication Date: 2026-03-10ARI ENERGY (HUIZHOU) CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-06-01
Publication Date
2026-03-10

AI Technical Summary

Technical Problem

The existing battery system and mobile terminal integration testing and new feature development testing are highly dependent on hardware, making hardware fault diagnosis difficult and hardware update processes complex and time-consuming, resulting in low testing and development efficiency.

Method used

By introducing a simulation server between the battery system and the mobile terminal, the operating data of the battery system can be simulated to achieve data interaction in Bluetooth mode and network mode, replacing hardware interaction and improving testing and development efficiency.

Benefits of technology

It enables joint testing and new feature development without relying on battery system hardware, improving testing and development efficiency and reducing the cost and time of hardware updates.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116599884B_ABST
    Figure CN116599884B_ABST
Patent Text Reader

Abstract

The application relates to the technical field of battery systems, and discloses a simulation device and method of a battery system, a terminal device and a computer storage medium. The simulation device of the battery system comprises a mobile terminal, a battery system and a simulation server. The mobile terminal is used for establishing a Bluetooth communication connection with the battery system in a Bluetooth mode to interact with the battery system through a Bluetooth instruction data packet, and is used for establishing a network communication connection with the simulation server in a network mode to interact with the simulation server through a network data packet, wherein the network data packet comprises a data acquisition request. The simulation server is used for simulating running data of the battery system, and is used for transmitting a network data packet of the running data corresponding to the data acquisition request to the mobile terminal when receiving the data acquisition request sent by the mobile terminal. The application can improve the joint debugging test efficiency between the battery system and the mobile terminal and the development efficiency of new functions.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of battery system, and particularly relates to a simulation device and method of battery system, a terminal device and a computer storage medium. BACKGROUND

[0002] Nowadays, with the popularity of smart phones, more and more smart hardware products begin to add Bluetooth function modules to realize the interaction between the products and the smart phones.

[0003] The existing battery system basically integrates a Bluetooth function module, and a user can connect the Bluetooth of the battery system through a mobile terminal to obtain the running data such as voltage, current and power of the battery system, and can also set the parameters of the battery system, which is beneficial to improve the intelligence and convenience of the battery system. However, in the joint debugging test and new function development test phase of the battery system and the mobile terminal, there is a strong dependence on the battery hardware. When the joint debugging test of the battery system and the mobile terminal is carried out, if the hardware of the battery system has a fault, due to the difficulty in troubleshooting and maintenance of the hardware fault, the test efficiency of other links of the joint debugging test will be seriously affected. When the Bluetooth instruction of the new function needs to be added between the battery system and the mobile terminal, the battery hardware needs to be updated, and the hardware update of the battery system also has the problems of complex process and long time consumption, which reduces the development efficiency of the new function.

[0004] In summary, how to improve the joint debugging test efficiency between the battery system and the mobile terminal and the development efficiency of the new function has become a problem to be solved in the field. SUMMARY

[0005] The main purpose of the present application is to provide a simulation device and method of battery system, a terminal device and a computer storage medium, which aims to replace the interaction between the battery system and the mobile terminal by using a simulation server, so as to improve the joint debugging test efficiency between the battery system and the mobile terminal and the development efficiency of the new function.

[0006] To achieve the above purpose, the present application provides a simulation device of battery system, which comprises a mobile terminal, a battery system and a simulation server.

[0007] The mobile terminal is used for establishing a Bluetooth communication connection with the battery system in a Bluetooth mode to interact with the battery system through a Bluetooth instruction data packet, and establishing a network communication connection with the simulation server in a network mode to interact with the simulation server through a network data packet, wherein the network data packet comprises a data acquisition request.

[0008] The simulation server is configured to simulate operation data of the battery system, and transmit network data packets of the operation data corresponding to a data acquisition request to the mobile terminal when the data acquisition request is received.

[0009] Optionally, the mobile terminal comprises:

[0010] a data communication layer configured to parse the network data packets of the operation data transmitted by the simulation server to obtain a parsing result;

[0011] a data interface layer configured to receive the parsing result transmitted by the data communication layer and transmit the parsing result to a service layer;

[0012] the service layer is configured to display the operation data according to the parsing result.

[0013] Optionally, the data communication layer is further configured to encapsulate the Bluetooth instruction data packet into the network data packet.

[0014] the data communication layer is further configured to send the network data packet to the simulation server.

[0015] the data communication layer comprises:

[0016] an acquisition unit configured to acquire service code and service data in the Bluetooth instruction data packet;

[0017] an encapsulation unit configured to encapsulate the service code and the service data into the network data packet.

[0018] Optionally, the network data packet further comprises a data modification request.

[0019] the simulation server is further configured to update operation data corresponding to the data modification request according to the data modification request when the data modification request is received from the mobile terminal, and transmit network data packets of the modified operation data to the mobile terminal.

[0020] Optionally, the mobile terminal further comprises:

[0021] a connection configuration switch configured to switch the Bluetooth mode to the network mode in response to a first mode switching instruction, and switch the network mode to the Bluetooth mode in response to a second mode switching instruction.

[0022] Optionally, the mobile terminal is further configured to initiate a network connection request to the simulation server based on a preset websocket protocol (a communication protocol) in response to the first mode switching instruction.

[0023] The simulation server is configured to return a network connection result corresponding to the network connection request to the mobile terminal based on the websocket protocol.

[0024] Optionally, the mobile terminal is further configured to, in response to the second mode switching instruction, initiate a Bluetooth connection request to the battery system based on a preset Bluetooth SDK (Software Development Kit).

[0025] The battery system is configured to return a Bluetooth connection result corresponding to the Bluetooth connection request to the mobile terminal based on the Bluetooth SDK.

[0026] In addition, to achieve the above object, the application further provides a battery system simulation method applied to a mobile terminal in a battery system simulation device, wherein the mobile terminal is connected with a battery system and a simulation server in the device respectively, and the battery system simulation method comprises the following steps of:

[0027] In the Bluetooth mode, a Bluetooth communication connection is established with the battery system to interact with the battery system in a Bluetooth instruction data packet;

[0028] In the network mode, a network communication connection is established with the simulation server to interact with the simulation server in a network data packet, wherein the network data packet comprises a data acquisition request, so that the simulation server transmits a network data packet of running data corresponding to the data acquisition request when receiving the data acquisition request, and the simulation server is configured to simulate the running data of the battery system.

[0029] In addition, to achieve the above object, the application further provides a terminal device, which comprises the battery system simulation device, a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the computer program is executed by the processor to implement the steps of the battery system simulation method.

[0030] In addition, to achieve the above object, the application further provides a computer storage medium, wherein the computer storage medium stores a computer program, and the computer program is executed by a processor to implement the steps of the battery system simulation method.

[0031] The application provides a battery system simulation device, a battery system simulation method, a terminal device and a computer storage medium, wherein the battery system simulation device comprises a mobile terminal, a battery system and a simulation server; the mobile terminal is used for establishing a Bluetooth communication connection with the battery system in a Bluetooth mode to interact with the battery system through a Bluetooth instruction data packet, and establishing a network communication connection with the simulation server in a network mode to interact with the simulation server through a network data packet, wherein the network data packet comprises a data acquisition request; the simulation server is used for simulating running data of the battery system, and transmitting a network data packet of the running data corresponding to the data acquisition request to the mobile terminal when receiving the data acquisition request sent by the mobile terminal.

[0032] Compared with the traditional joint debugging test and new function development test through the interaction between the battery system and the mobile terminal, the application performs the joint debugging test and the new function development test through the battery system simulation device comprising the mobile terminal, the battery system and the simulation server, wherein the mobile terminal establishes a Bluetooth communication connection with the battery system in the Bluetooth mode, so that the mobile terminal and the battery system can exchange data and transmit a Bluetooth instruction data packet; the mobile terminal establishes a network communication connection with the simulation server in the network mode, so that the mobile terminal and the simulation server can exchange data and transmit a network data packet of a simulated Bluetooth instruction; the simulation server is used for simulating running data of the battery system, so that the simulation server can replace the battery system to interact with the mobile terminal; when receiving a data acquisition request network data packet sent by the mobile terminal, the simulation server transmits a network data packet of running data corresponding to the data acquisition request to the mobile terminal, and the running data is the running data of the battery system simulated by the simulation server.

[0033] Therefore, the application replaces the battery system with the simulation server to interact with the mobile terminal, and no longer depends on the hardware of the battery system, so that the joint debugging test efficiency and the new function development efficiency between the battery system and the mobile terminal are improved. BRIEF DESCRIPTION OF DRAWINGS

[0034] Figure 1 A device structure schematic diagram of a hardware running environment of a terminal device related to an embodiment scheme of the application;

[0035] Figure 2 A signal connection schematic diagram of an embodiment of the battery system simulation device provided by the embodiment scheme of the application;

[0036] Figure 3 A data packet switching schematic diagram of an embodiment of the battery system simulation method provided by the embodiment scheme of the application;

[0037] Figure 4A schematic diagram of the structure of an embodiment of the battery system simulation method provided in this application;

[0038] Figure 5 A schematic diagram of network communication connections involved in an embodiment of the battery system simulation method provided in this application;

[0039] Figure 6 A schematic diagram of Bluetooth communication connection involved in an embodiment of the battery system simulation method provided in the present application;

[0040] Figure 7 A schematic flowchart illustrating an embodiment of the battery system simulation method provided in this application.

[0041] The realization of the purpose, functional features and advantages of this application will be further explained in conjunction with the embodiments and with reference to the accompanying drawings. Detailed Implementation

[0042] It should be understood that the specific embodiments described herein are merely illustrative of this application and are not intended to limit this application.

[0043] Reference Figure 1 , Figure 1 This is a schematic diagram of the hardware operating environment of the terminal device provided in the embodiments of this application.

[0044] like Figure 1 As shown, the terminal device may include: a processor 1001, such as a CPU; a communication bus 1002; a user interface 1003; a network interface 1004; a memory 1005; and a simulation device for a battery system designed with a converged security module (the converged security module is used to process data according to multiple communication security protocols). The communication bus 1002 is used to realize communication between these components. The user interface 1003 may include a display screen and an input unit such as a keyboard; optionally, the user interface 1003 may also include a standard wired interface or a wireless interface. The network interface 1004 may optionally include a standard wired interface or a wireless interface (such as a Wi-Fi interface). The memory 1005 may be a high-speed RAM memory or a stable memory (non-volatile memory), such as a disk storage device. Optionally, the memory 1005 may also be a storage device independent of the aforementioned processor 1001.

[0045] Those skilled in the art will understand that Figure 1 The structure shown does not constitute a limitation on the terminal device. The terminal device provided in this application may include more or fewer components than shown, or combine certain components, or have different component arrangements.

[0046] like Figure 1 As shown, the memory 1005, which serves as a computer storage medium, may include an operating system, a network communication module, a user interface module, and computer programs.

[0047] exist Figure 1 In the terminal shown, network interface 1004 is mainly used to connect to the backend server and communicate data with it; user interface 1003 is mainly used to connect to the client and communicate data with it; and processor 1001 can be used to call the computer program stored in memory 1005 and execute the following steps:

[0048] In Bluetooth mode, a Bluetooth communication connection is established with the battery system to exchange Bluetooth command data packets with the battery system;

[0049] In network mode, a network communication connection is established with the simulation server to interact with the simulation server via network data packets. The network data packets include data acquisition requests, so that when the simulation server receives a data acquisition request, it transmits a network data packet containing the operating data corresponding to the data acquisition request. The simulation server is used to simulate the operating data of the battery system.

[0050] Based on the hardware operating environment involved in the above embodiments of this application, an overall concept for a battery system simulation device provided by the embodiments of this application is proposed.

[0051] Most existing battery systems integrate Bluetooth modules, allowing users to access operating data such as voltage, current, and power via mobile devices. Users can also configure battery system parameters, enhancing intelligence and convenience. However, both the integration testing and new feature development phases between the battery system and mobile devices heavily rely on battery hardware. Hardware failures during integration testing can severely impact efficiency due to the difficulty of troubleshooting and repairing such issues. Furthermore, adding new Bluetooth commands for communication between the battery system and mobile devices requires updating the battery hardware, a complex and time-consuming process that further hinders new feature development.

[0052] It should be noted that the joint testing between the battery system and the mobile terminal is also known as assembly testing, joint testing, subsystem testing, or component testing. The focus of joint testing is on the correctness of the interfaces between modules, whether the data flow and control flow between modules achieve their functions as designed, and the correctness of the overall function after integration.

[0053] In summary, improving the efficiency of joint testing and debugging between battery systems and mobile terminals, as well as the efficiency of developing new functions, has become an urgent problem to be solved in this field.

[0054] To address the aforementioned problems, this application provides a battery system simulation device. The battery system simulation device provided by this application includes: a mobile terminal, a battery system, and a simulation server; the mobile terminal is used to establish a Bluetooth communication connection with the battery system in Bluetooth mode to interact with the battery system via Bluetooth command data packets; and to establish a network communication connection with the simulation server in network mode to interact with the simulation server via network data packets, the network data packets including data acquisition requests; the simulation server is used to simulate the operating data of the battery system; and, upon receiving a data acquisition request sent by the mobile terminal, to transmit a network data packet containing the operating data corresponding to the data acquisition request to the mobile terminal.

[0055] Compared to traditional methods that rely solely on interaction between the battery system and the mobile terminal for joint debugging and new feature development testing, this application utilizes a battery system simulation device comprising a mobile terminal, a battery system, and a simulation server for these tests. Specifically, the mobile terminal establishes a Bluetooth communication connection with the battery system in Bluetooth mode, enabling the exchange of Bluetooth command data packets. In network mode, the mobile terminal establishes a network communication connection with the simulation server, allowing the exchange of network data packets containing simulated Bluetooth commands. The simulation server simulates the battery system's operational data and can interact with the mobile terminal on behalf of the battery system. When the simulation server receives a data acquisition request network data packet from the mobile terminal, it transmits the corresponding operational data network data packet to the mobile terminal. This operational data is the battery system's operational data simulated by the simulation server.

[0056] Thus, this application uses a simulated server to replace the battery system to interact with the mobile terminal, eliminating reliance on the battery system hardware and thereby improving the efficiency of joint debugging and testing between the battery system and the mobile terminal, as well as the efficiency of developing new functions.

[0057] Based on the hardware operating environment involved in the above-described embodiments of this application and the overall concept of the simulation device for the battery system of this application, further embodiments of the simulation device for the battery system of this application are proposed.

[0058] Please refer to Figure 2 , Figure 2 This is a schematic diagram of the signal connections for the first embodiment of the simulation device for the battery system of this application. It should be noted that... Figure 2The structure shown does not constitute a limitation on the simulation device of the battery system of this application. In some cases, the simulation device of the battery system of this application may of course include more or fewer components than shown, or combine certain components, or have different component arrangements.

[0059] In this embodiment, the battery system simulation device of this application includes: a mobile terminal, a battery system, and a simulation server;

[0060] The mobile terminal is configured to establish a Bluetooth communication connection with the battery system in Bluetooth mode to interact with the battery system via Bluetooth command data packets; and to establish a network communication connection with the simulation server in network mode to interact with the simulation server via network data packets, wherein the network data packets include data acquisition requests.

[0061] In this embodiment, the battery system simulation device includes a mobile terminal, a battery system, and a simulation server. The mobile terminal can switch between Bluetooth mode and network mode at any time. When the mobile terminal is in Bluetooth mode, it can establish a Bluetooth communication connection with the battery system within a certain range and transmit Bluetooth command data packets with the battery system based on the connection. When the mobile terminal is in network mode, it can establish a network communication connection with the simulation server and transmit network data packets with the simulation server based on the connection. The transmitted network data packets include data acquisition requests.

[0062] It should be noted that in this embodiment, the mobile terminal can be a mobile phone, laptop, tablet computer, etc. The mobile terminal can interact with the battery system through its installed application (APP). When the user connects to the battery system via Bluetooth through the application, the battery system can be grouped and disassembled, and the operating data such as voltage, current, and power of the battery system can be viewed and the battery system parameters can be set.

[0063] The simulation server is used to simulate the operating data of the battery system; and, upon receiving a data acquisition request sent by the mobile terminal, to transmit the network data packet of the operating data corresponding to the data acquisition request to the mobile terminal.

[0064] In this embodiment, the battery system simulation device includes a simulation server. The simulation server is used to simulate the operating data of the battery system, such as the voltage, current, and power of the battery system. When a network communication connection is established with the mobile terminal, it can receive data acquisition requests sent by the mobile terminal and transmit the operating data corresponding to the data acquisition request to the mobile terminal in the form of network data packets.

[0065] It should be noted that in this embodiment, the simulation server is a local server pre-created by the user to simulate the battery system to receive and send data to the mobile terminal. Specifically, the user adds instructions to the local server to simulate the operating data of the battery system, and the mobile terminal can display the operating data of the battery system by connecting to the newly added instructions in the local server.

[0066] Optionally, in one feasible embodiment, the mobile terminal of the battery system simulation device of this application includes:

[0067] The data communication layer is used to parse the network data packets of the running data transmitted by the simulation server to obtain the parsing results;

[0068] The data interface layer is used to receive the parsing result transmitted by the data communication layer and transmit the parsing result to the business layer;

[0069] The business layer is used to display the operational data based on the parsing results.

[0070] In this embodiment, as Figure 3 As shown, the mobile terminal includes a data communication layer, a data interface layer, and a service layer. The data communication layer is used to interact with the simulation server. When the simulation server transmits network data packets containing the operating data of the simulated battery system to the data communication layer, the data communication layer parses the received network data packets so that the service layer can recognize the operating data. Then, the data communication layer passes the parsing result to the data interface layer, which in turn passes the parsing result to the service layer. After receiving the parsing result, the service layer displays the operating data of the battery system corresponding to the parsing result.

[0071] In addition, in one feasible embodiment, the data communication layer is also used to receive Bluetooth command data packets sent by the battery system in Bluetooth mode, and to parse the Bluetooth command data packets to obtain the parsing result.

[0072] Optionally, in a feasible embodiment, the data communication layer of the battery system simulation device of this application is further configured to encapsulate the Bluetooth command data packet into the network data packet;

[0073] The data communication layer is also used to send the network data packets to the simulation server.

[0074] The data communication layer includes:

[0075] The acquisition unit is used to acquire the service code and service data in the Bluetooth command data packet;

[0076] An encapsulation unit is used to encapsulate the business code and the business data into the network data packet.

[0077] In this embodiment, since the simulation server cannot recognize Bluetooth commands, the data communication layer needs to encapsulate the data acquisition request from the Bluetooth command data packet into a network data packet before sending the data acquisition request to the simulation server. Specifically, the data communication layer includes an acquisition unit and an encapsulation unit. The acquisition unit is used to separate the service code and service data in the Bluetooth command data packet to be sent to the simulation server, and the encapsulation unit is used to encapsulate the separated service code and service data into a network data packet. Then, the data communication layer sends the encapsulated network data packet to the simulation server so that the simulation server can receive the command.

[0078] For example, such as Figure 4 As shown, the Bluetooth command data packet format includes a start identifier, data area length, data area, checksum, and end identifier. The data area stores service codes and service data. The network data packet format includes a network header and an IP data packet. The IP data packet includes an IP header and a TCP segment. The TCP segment includes a TCP header and a data area. The data area stores service codes and service data. When the mobile terminal encapsulates the Bluetooth command data packet into a network data packet, it separates the service codes and service data stored in the Bluetooth command data packet and moves them to the data area of ​​the network data packet.

[0079] Furthermore, since the mobile terminal's service layer only uses service code and service data, when parsing network data packets sent by the simulated server, the mobile terminal only needs to separate the service code and service data within the network data packets, and the service layer and data communication layer use a unified data transmission interface to achieve the reception and identification of network data packets. Similarly, when parsing Bluetooth command data packets sent by the battery system, the mobile terminal only needs to separate the service code and service data within the Bluetooth command data packets, and the service layer and data communication layer use a unified data transmission interface to achieve the reception and identification of Bluetooth command data packets.

[0080] Optionally, in one feasible embodiment, the network data packet of the simulation device of the battery system of this application further includes a data modification request;

[0081] The simulation server is further configured to, upon receiving the data modification request sent by the mobile terminal, update the running data corresponding to the data modification request according to the data modification request, and transmit the network data packet of the modified running data to the mobile terminal.

[0082] In this embodiment, the network data packet transmitted from the mobile terminal to the simulation server also includes a data modification request. When the simulation server receives the data modification request sent by the mobile terminal, it modifies the running data corresponding to the request and transmits the network data packet of the modified running data to the mobile terminal.

[0083] It should be noted that, in this embodiment, since the mobile terminal can both obtain the operating data of the battery system and set the parameters of the battery system, the mobile terminal can also obtain the operating data simulated by the simulation server and set the relevant parameters. Similarly, based on the needs of actual applications, the mobile terminal can also send other types of network data packets to the simulation server to conduct tests with the mobile terminal in place of the battery system through the simulation server.

[0084] In this embodiment, the battery system simulation device of this application includes: a mobile terminal, a battery system, and a simulation server; the mobile terminal is used to establish a Bluetooth communication connection with the battery system in Bluetooth mode to interact with the battery system via Bluetooth command data packets; and to establish a network communication connection with the simulation server in network mode to interact with the simulation server via network data packets, the network data packets including data acquisition requests; the simulation server is used to simulate the operating data of the battery system; and, upon receiving a data acquisition request sent by the mobile terminal, to transmit the network data packets of the operating data corresponding to the data acquisition request to the mobile terminal.

[0085] Compared to traditional methods that rely solely on interaction between the battery system and the mobile terminal for joint debugging and new feature development testing, this application utilizes a battery system simulation device comprising a mobile terminal, a battery system, and a simulation server for these tests. Specifically, the mobile terminal establishes a Bluetooth communication connection with the battery system in Bluetooth mode, enabling the exchange of Bluetooth command data packets. In network mode, the mobile terminal establishes a network communication connection with the simulation server, allowing the exchange of network data packets containing simulated Bluetooth commands. The simulation server simulates the battery system's operational data and can interact with the mobile terminal on behalf of the battery system. When the simulation server receives a data acquisition request network data packet from the mobile terminal, it transmits the corresponding operational data network data packet to the mobile terminal. This operational data is the battery system's operational data simulated by the simulation server.

[0086] Thus, this application uses a simulated server to replace the battery system to interact with the mobile terminal, eliminating reliance on the battery system hardware. This improves the efficiency of joint debugging and testing between the battery system and the mobile terminal, as well as the efficiency of developing new functions, while also reducing development and testing costs.

[0087] Furthermore, based on the first embodiment of the battery system simulation device of this application described above, a second embodiment of the battery system simulation device of this application is proposed. In this embodiment, the mobile terminal of the battery system simulation device of this application further includes:

[0088] A connection configuration switch is configured to switch the Bluetooth mode to the network mode in response to a first mode switching command; and to switch the network mode to the Bluetooth mode in response to a second mode switching command.

[0089] In this embodiment, the mobile terminal includes a connection configuration switch, which allows the user to select a connection method. Specifically, in response to a first mode switching command, the connection configuration switch switches the mobile terminal from Bluetooth connection mode to network connection mode; in response to a second mode switching command, the connection configuration switch switches the mobile terminal from network connection mode to Bluetooth connection mode.

[0090] Optionally, in a feasible embodiment, the mobile terminal of the battery system simulation device of this application is further configured to respond to the first mode switching instruction to initiate a network connection request to the simulation server based on a preset websocket protocol.

[0091] The simulated server is used to return the network connection result corresponding to the network connection request to the mobile terminal based on the WebSocket protocol.

[0092] In this embodiment, in response to the first mode switching command, the mobile terminal switches from Bluetooth mode to network mode. The mobile terminal initiates a network connection request to the simulation server based on the WebSocket protocol. After receiving the request, the simulation server returns the network connection result corresponding to the request to the mobile terminal based on the WebSocket protocol. That is, the mobile terminal establishes a network communication connection with the simulation server based on the WebSocket protocol.

[0093] It should be noted that in this embodiment, the simulated server is a pre-created local WebSocket server used to receive and send data to the mobile terminal. The WebSocket server can not only return data to the mobile terminal after receiving a data retrieval request from the mobile terminal, but also actively push data to the mobile terminal. Furthermore, the WebSocket server and the mobile terminal only need to complete a handshake once to establish a persistent connection for bidirectional data transmission.

[0094] For example, such as Figure 5As shown, the mobile terminal interacts with the simulation server through an APP. When the APP is in network connection mode, the user opens the APP, the APP establishes network initialization with the WebSocket, the WebSocket returns the initialization result, and after initialization, the APP initiates a connection to the simulation server by sending the connection server address and port to the WebSocket. After receiving the connection request, the simulation server returns the connection result based on the WebSocket, thereby realizing the network communication connection between the APP and the simulation server.

[0095] Optionally, in a feasible embodiment, the mobile terminal of the battery system simulation device of this application is further configured to respond to the second mode switching command to initiate a Bluetooth connection request to the battery system based on a preset Bluetooth SDK;

[0096] The battery system is used to return the Bluetooth connection result corresponding to the Bluetooth connection request to the mobile terminal based on the Bluetooth SDK.

[0097] In this embodiment, the mobile terminal responds to the second mode switching command and switches from network mode to Bluetooth mode. The mobile terminal initiates a Bluetooth connection request to the battery system based on the Bluetooth SDK. After receiving the request, the battery system returns the Bluetooth connection result corresponding to the request to the mobile terminal based on the Bluetooth SDK. That is, the mobile terminal establishes a Bluetooth communication connection with the battery system based on the Bluetooth SDK.

[0098] For example, such as Figure 6 As shown, the mobile terminal interacts with the simulation server through an APP. When the user turns on the battery switch and the APP is in Bluetooth connection mode, the user opens the APP, and the APP establishes an InitBle (Bluetooth initialization) with the Bluetooth SDK. The Bluetooth SDK returns the initialization result. After initialization, the user initiates a SearchBle (Bluetooth search) with the Bluetooth SDK through the APP. The Bluetooth SDK returns a list of Bluetooth devices found. Finally, the user selects a Bluetooth device in the APP, i.e., selects the battery system, and initiates a connection to the battery by sending a ConnectBle (Bluetooth connection) to the Bluetooth SDK. The Bluetooth SDK returns the connection result, thus realizing the Bluetooth communication connection between the APP and the battery system.

[0099] Furthermore, based on the various embodiments of the simulation device for the battery system described above, embodiments of the simulation method for the battery system of this application are proposed.

[0100] It should be noted that the battery system simulation method of this application is applied to the mobile terminal in the aforementioned battery system simulation device. This mobile terminal is connected to both the battery system and the simulation server within the device. It should be understood that, based on different design requirements for practical applications, the battery system simulation method of this application can, of course, be applied to other terminal devices in different feasible embodiments. However, for ease of understanding and explanation of the technical solution, the following description will use the mobile terminal as the implementing entity to illustrate the battery system simulation method of this application.

[0101] Please refer to Figure 7 , Figure 7 This is a flowchart illustrating the steps of an embodiment of the battery system simulation method of this application. It should be noted that although the logical order is shown in the flowchart, in some cases, the battery system simulation method of this application may, of course, execute the steps shown or described in a different order than that shown here.

[0102] like Figure 7 As shown, the simulation method for the battery system provided in this application may include the following steps:

[0103] Step S10: In Bluetooth mode, establish a Bluetooth communication connection with the battery system to interact with the battery system via Bluetooth command data packets;

[0104] In this embodiment, the mobile terminal has two connection modes: Bluetooth mode and network mode. When the mobile terminal is in Bluetooth mode, it establishes a Bluetooth communication connection with the battery system and the two transmit Bluetooth command data packets to each other. Thus, the mobile terminal can realize the grouping and disassembly of the battery system, view the operating data of the battery system, set the battery system parameters, etc.

[0105] Step S20: In network mode, establish a network communication connection with the simulation server to interact with the simulation server via network data packets. The network data packets include data acquisition requests, so that when the simulation server receives a data acquisition request, it transmits the network data packets of the running data corresponding to the data acquisition request. The simulation server is used to simulate the running data of the battery system.

[0106] In this embodiment, the simulation server of the simulation device simulates the operating data of the battery system. When the mobile terminal is in network mode, it establishes a network communication connection with the simulation server. The simulation server replaces the battery system to exchange data with the mobile terminal. The mobile terminal and the simulation server transmit network data packets to each other. The network data packets include data acquisition requests. When the simulation server receives a data acquisition request sent by the mobile terminal, it transmits the network data packet of the operating data corresponding to the request to the mobile terminal.

[0107] For example, when a battery system needs to add a new function to display temperature data on an app, developers need to add a Bluetooth command for battery system temperature data between the battery system and the mobile app. Adding the Bluetooth command requires an upgrade to the battery system. If the battery system is not upgraded, but the mobile app has already been developed and needs to be tested, developers can add a command to the simulation server to simulate the battery system's temperature data. This enables the app to enable network mode and connect to the simulation server. By using the simulation server instead of the battery system for testing with the mobile app, testing costs are reduced and the development efficiency of new features is improved.

[0108] In this embodiment, the battery system simulation method provided by this application enables the development of new battery system functions without relying heavily on battery system upgrades. The simulation server can be customized with corresponding Bluetooth commands to test new functions in advance. Furthermore, in cases of battery hardware failure or shortage, the simulation server can be used as a substitute, allowing for joint testing between the simulation server and the mobile terminal. This effectively improves development and testing efficiency, saves R&D investment and battery hardware costs, and verifies the correctness of the APP program in advance, thereby effectively improving product reliability.

[0109] This application also provides a terminal device, which includes: a battery system simulation device as described in any of the above embodiments, a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the computer program, when executed by the processor, implements the steps of the battery system simulation method as described in any of the above embodiments.

[0110] This application also provides a computer storage medium storing a computer program that, when executed by a processor, implements the steps of the battery system simulation method as described in any of the above embodiments.

[0111] The specific embodiments of the computer storage medium in this application are basically the same as the embodiments of the above-described battery system simulation method, and will not be described in detail here.

[0112] The above are merely preferred embodiments of this application and do not limit the patent scope of this application. Any equivalent structural or procedural transformations made using the content of this application's specification and drawings, or direct or indirect applications in other related technical fields, are similarly included within the patent protection scope of this application.

Claims

1. An analog device of a battery system, characterized by, The simulation device of the battery system comprises a mobile terminal, a battery system and a simulation server; The mobile terminal is configured to establish a Bluetooth communication connection with the battery system in a Bluetooth mode to interact with the battery system through a Bluetooth instruction data packet, and establish a network communication connection with the simulation server in a network mode to interact with the simulation server through a network data packet, wherein the network data packet comprises a data acquisition request; The simulation server is configured to simulate running data of the battery system, and transmit a network data packet of the running data corresponding to the data acquisition request to the mobile terminal upon receiving the data acquisition request; The mobile terminal comprises a data communication layer, and the data communication layer comprises: An acquisition unit configured to separate a service code and service data in a Bluetooth instruction data packet to be sent to the simulation server, wherein the Bluetooth instruction data packet comprises a start identifier, a data area length, a data area, a check code and an end identifier, and the service code and the service data are stored in the data area; An encapsulation unit configured to encapsulate the service code and the service data into a network data packet, wherein the network data packet comprises a network header and an IP data packet, the IP data packet comprises an IP header and a TCP message segment, the TCP message segment comprises a TCP header and a data area, the service code and the service data are stored in the data area, and the service code and the service data stored in the Bluetooth instruction data packet are separated and moved to the data area of the network data packet when the Bluetooth instruction data packet is encapsulated into the network data packet by the mobile terminal; The mobile terminal further comprises a connection configuration switch configured to switch the Bluetooth mode to the network mode in response to a first mode switching instruction, and initiate a network connection request to the simulation server based on a preset websocket protocol; and switch the network mode to the Bluetooth mode in response to a second mode switching instruction, and initiate a Bluetooth connection request to the battery system based on a preset Bluetooth SDK.

2. The simulation apparatus of the battery system according to claim 1, wherein The mobile terminal comprises: A data communication layer configured to analyze a network data packet of the running data transmitted by the simulation server to obtain an analysis result; A data interface layer configured to receive the analysis result transmitted by the data communication layer, and transmit the analysis result to a service layer; The service layer is configured to display the running data according to the analysis result.

3. The simulation apparatus of the battery system according to claim 1, wherein The network data packet further comprises a data modification request; The simulation server is further configured to update the running data corresponding to the data modification request according to the data modification request upon receiving the data modification request sent by the mobile terminal, and transmit a network data packet of the modified running data to the mobile terminal.

4. The simulation apparatus of the battery system according to claim 1, wherein The simulation server is configured to return a network connection result corresponding to the network connection request to the mobile terminal based on the websocket protocol.

5. The simulation apparatus of the battery system according to claim 1, wherein The battery system is configured to return a Bluetooth connection result corresponding to the Bluetooth connection request to the mobile terminal based on the Bluetooth SDK.

6. A simulation method of a battery system, characterized by, The battery system simulation method is applied to a mobile terminal in a battery system simulation device as claimed in any one of claims 1 to 5, the mobile terminal being in data connection with a battery system and a simulation server in the device respectively, the battery system simulation method comprising: in a Bluetooth mode, establishing a Bluetooth communication connection with the battery system to interact with the battery system in a Bluetooth instruction data packet; in a network mode, establishing a network communication connection with the simulation server to interact with the simulation server in a network data packet, the network data packet comprising a data acquisition request, so that the simulation server transmits a network data packet of running data corresponding to the data acquisition request when receiving the data acquisition request, wherein the simulation server is used to simulate running data of the battery system; the mobile terminal further comprises a connection configuration switch, in response to a first mode switching instruction, switching the Bluetooth mode to the network mode, and initiating a network connection request to the simulation server based on a preset websocket protocol; and, in response to a second mode switching instruction, switching the network mode to the Bluetooth mode, and initiating a Bluetooth connection request to the battery system based on a preset Bluetooth SDK.

7. A terminal device, characterized by comprising: The terminal device comprises a battery system simulation device as claimed in any one of claims 1 to 5, a memory, a processor and a computer program stored on the memory and executable on the processor, the computer program being executed by the processor to implement the steps of the battery system simulation method as claimed in claim 6.

8. A computer storage medium, characterized in that, The computer storage medium stores a computer program, the computer program being executed by the processor to implement the steps of the battery system simulation method as claimed in claim 6.

Citation Information

Patent Citations

  • Battery system simulation device of hybrid electric vehicle

    KR100494937B1