An eSIM support detection method, apparatus, device and medium
By storing the detection parameters of the vehicle-mounted device in a configuration file, the problem of poor compatibility of the vehicle-mounted device with eSIM detection is solved, and a rapid adaptation and low-cost detection solution is achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- SHENZHEN STREAMING VIDEO TECH
- Filing Date
- 2026-03-23
- Publication Date
- 2026-06-19
AI Technical Summary
In the existing technology, the eSIM support detection scheme for vehicle-mounted devices is difficult to adapt to the design differences of different vehicle-mounted devices, resulting in high maintenance costs and poor adaptability.
By storing the detection parameters corresponding to different vehicle devices in the configuration file, the target detection pin identifier and effective level are determined, enabling rapid adaptation to eSIM support detection of different vehicle devices without modifying the code.
This enables the detection system to be quickly adapted to different vehicle-mounted devices without modifying the code, reducing maintenance costs and improving adaptability.
Smart Images

Figure CN122240408A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of vehicle-mounted equipment testing, and in particular to an eSIM-supported testing method, apparatus, equipment, and medium. Background Technology
[0002] In scenarios such as connected vehicles and intelligent in-vehicle devices, eSIM (Embedded-SIM) is increasingly being used as a communication solution that eliminates the need for a physical SIM (Subscriber Identity Module) card. However, different in-vehicle devices support eSIM to varying degrees; some support it while others do not. Therefore, a solution is needed to automatically detect whether an in-vehicle device supports eSIM, ensuring that the device can be correctly configured and used.
[0003] Conventional solutions often hard-code fixed GPIO (General Purpose Input / Output) pins and voltage levels into the detection system's code. This allows the system to detect whether the in-vehicle device supports eSIM by running the code. However, when the detection system needs to be adapted to other in-vehicle devices, the fixed code is difficult to adapt to the design differences of different devices. To achieve this, the code must be modified and recompiled, resulting in high maintenance costs and poor compatibility. Summary of the Invention
[0004] In view of this, the purpose of this invention is to provide an eSIM support detection method, apparatus, device, and medium. By storing detection parameters corresponding to different in-vehicle devices in a configuration file, the detection system can quickly adapt to eSIM support detection of different in-vehicle devices without modifying the code, resulting in low maintenance costs and high adaptability. The specific solution is as follows: In a first aspect, this application provides an eSIM-supported detection method, applied to a pre-defined detection system running on a target vehicle-mounted device, comprising: The target detection parameters corresponding to the target vehicle device are determined based on the configuration file; the configuration file is used to store the detection parameters corresponding to different vehicle devices, and the detection parameters are the parameters for detecting whether the vehicle device supports eSIM; In response to a detection request, the target detection pin identifier and target valid level corresponding to the target vehicle device are determined based on the detection enable flag in the target detection parameters; the detection request is a detection request initiated by the target vehicle device to determine whether it supports eSIM locally; Read the actual level of the target general-purpose input / output pin; the target general-purpose input / output pin is the general-purpose input / output pin in the target vehicle device that corresponds to the target detection pin identifier; Based on the consistency between the actual voltage level and the target effective voltage level, it is detected whether the target vehicle device supports eSIM.
[0005] Optionally, determining the target detection parameters corresponding to the target vehicle-mounted device based on the configuration file includes: Perform the file opening operation on the configuration file; If the configuration file is opened successfully, the detection parameters in the configuration file are mapped to the preset memory based on the preset data structure to obtain the mapped data; If the detection parameters corresponding to the target vehicle device are read from the mapping data, then the target detection parameters corresponding to the target vehicle device are determined based on the read detection parameters. If the configuration file fails to open, or if the detection parameters corresponding to the target vehicle device are not read from the mapping data, then the target detection parameters corresponding to the target vehicle device are determined based on the default detection parameters.
[0006] Optionally, the detection parameters include a detection enable flag, a detection pin identifier, and an active level; Accordingly, determining the target detection pin identifier and target valid level corresponding to the target vehicle-mounted device based on the detection enable flag in the target detection parameters includes: If the detection enable flag in the target detection parameters is a first preset flag, then the detection pin identifier in the target detection parameters is determined as the target detection pin identifier, and the valid level in the target detection parameters is determined as the target valid level; If the detection enable flag in the target detection parameters is the second preset flag, then the detection pin identifier in the default detection parameters is determined as the target detection pin identifier, and the valid level in the default detection parameters is determined as the target valid level.
[0007] Optionally, the detection pin identifier includes a pin group number and a pin number; the pin group number is the group number of the port group in which the general-purpose input / output pin is located, and the pin number is the position number of the general-purpose input / output pin in the port group. Accordingly, reading the actual level of the target general-purpose input / output pin includes: Perform a preset device opening operation to open the target vehicle-mounted device; Based on the pin group number and pin position number in the target detection pin identifier, the corresponding target general-purpose input / output pin is determined from the target vehicle device; Read the actual level of the target general-purpose input / output pin.
[0008] Optionally, the response to the detection request includes: The detection request is parsed to determine the target request type and target request format. If the target request type is a preset request type and the target request format meets the preset format requirements, then respond to the detection request; If the target request type is not a preset request type, or the target request format does not meet the preset format requirements, then the first response information indicating a request error will be returned to the target vehicle device.
[0009] Optionally, after detecting whether the target vehicle device supports eSIM based on the consistency between the actual voltage level and the target effective voltage level, the method further includes: A second response is generated based on the target detection result; wherein, the target detection result is the detection result of whether the target vehicle device supports eSIM; The second response information is returned to the target vehicle device so that the target vehicle device can determine whether to enable eSIM based on the second response information.
[0010] Optionally, the method further includes: Upon receiving an update instruction for the configuration file, the detection parameters corresponding to the vehicle-mounted equipment in the configuration file are updated based on the update instruction. The update instructions include addition instructions and modification instructions; The newly added instruction is an instruction generated based on the detection parameters corresponding to the newly added vehicle-mounted device when the preset detection system needs to be adapted to the newly added vehicle-mounted device; The modification instruction is an instruction generated based on the detection parameters corresponding to any vehicle device when the hardware design related to eSIM in any vehicle device changes; any vehicle device can be any one of the different vehicle devices.
[0011] Secondly, this application provides an eSIM-supported detection device, applied to a preset detection system running on a target vehicle-mounted device, comprising: The parameter determination module is used to determine the target detection parameters corresponding to the target vehicle device based on the configuration file; the configuration file is used to store the detection parameters corresponding to different vehicle devices, and the detection parameters are the parameters for detecting whether the vehicle device supports eSIM; The request-response module is used to respond to a detection request by determining the target detection pin identifier and target valid level corresponding to the target vehicle device based on the detection enable flag in the target detection parameters; the detection request is a detection request initiated by the target vehicle device to determine whether it supports eSIM locally; A level reading module is used to read the actual level of the target general-purpose input / output pin; the target general-purpose input / output pin is the general-purpose input / output pin in the target vehicle device that corresponds to the target detection pin identifier; The device detection module is used to detect whether the target vehicle device supports eSIM based on the consistency between the actual voltage level and the target effective voltage level.
[0012] Thirdly, this application provides an electronic device, comprising: Memory, used to store computer programs; A processor for executing the computer program to implement the aforementioned eSIM support detection method.
[0013] Fourthly, this application provides a computer-readable storage medium for storing a computer program that, when executed by a processor, implements the aforementioned eSIM support detection method.
[0014] In this application, a preset detection system running on the target vehicle device determines the target detection parameters corresponding to the target vehicle device based on a configuration file. The configuration file stores the detection parameters corresponding to different vehicle devices, and the detection parameters are parameters for detecting whether the vehicle device supports eSIM. In response to a detection request, the system determines the target detection pin identifier and target valid level corresponding to the target vehicle device based on the detection enable flag in the target detection parameters. The detection request is a detection request initiated by the target vehicle device to determine whether it supports eSIM locally. The system reads the actual level of the target general-purpose input / output pin. The target general-purpose input / output pin is the general-purpose input / output pin in the target vehicle device that corresponds to the target detection pin identifier. Based on the consistency between the actual level and the target valid level, the system detects whether the target vehicle device supports eSIM. Therefore, this application stores the detection parameters corresponding to different vehicle-mounted devices through configuration files. When the detection system is running on the target vehicle-mounted device, the target detection parameters corresponding to the target vehicle-mounted device can be determined based on the configuration files, thereby realizing the detection of whether the target vehicle-mounted device supports eSIM. In this way, this application manages and maintains the detection parameters corresponding to different vehicle-mounted devices in a unified manner through configuration files, realizing the configurability of detection parameters. It can enable the detection system to quickly adapt to the eSIM support detection of different vehicle-mounted devices without modifying the detection system's code program, resulting in low maintenance costs and high adaptability. Attached Figure Description
[0015] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on the provided drawings without creative effort.
[0016] Figure 1 A flowchart of an eSIM support detection method provided in an embodiment of this application; Figure 2 A diagram illustrating an eSIM-supported detection architecture is provided in this application embodiment. Figure 3 A flowchart for reading a configuration file is provided as an embodiment of this application; Figure 4 A flowchart illustrating eSIM support detection is provided in this application embodiment; Figure 5 This is a schematic diagram of an eSIM-supported detection device provided in an embodiment of this application; Figure 6 This is a structural diagram of an electronic device provided in an embodiment of this application. Detailed Implementation
[0017] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0018] Conventional solutions often hard-code fixed GPIO pins and voltage levels into the detection system's code, allowing the system to detect whether an in-vehicle device supports eSIM by running the code. However, when the detection system needs to be adapted to other in-vehicle devices, the fixed code is difficult to adapt to the design differences of different devices. Adaptation requires code modification and recompilation, resulting in high maintenance costs and poor compatibility. Therefore, this application provides an eSIM support detection method that stores the detection parameters corresponding to different in-vehicle devices in a configuration file. This allows the detection system to quickly adapt to eSIM support detection for different in-vehicle devices without modifying the code, resulting in low maintenance costs and high compatibility.
[0019] See Figure 1As shown, this embodiment of the invention discloses an eSIM support detection method, applied to a preset detection system running on a target vehicle-mounted device, comprising: Step S11: Determine the target detection parameters corresponding to the target vehicle device based on the configuration file; the configuration file is used to store the detection parameters corresponding to different vehicle devices, and the detection parameters are the parameters for detecting whether the vehicle device supports eSIM.
[0020] In this embodiment, when the preset detection system is running on the target vehicle-mounted device, preset trigger events are monitored. Upon detection of a preset trigger event, target detection parameters corresponding to the target vehicle-mounted device are determined based on a configuration file. These preset trigger events include, but are not limited to, detecting the startup of the preset detection system and detecting the power-on of the target vehicle-mounted device.
[0021] It should be noted that the configuration file is used to store the detection parameters corresponding to different vehicle devices, and the detection parameters are used to detect whether the vehicle device supports eSIM, which may include detection enable flag, detection pin identifier and valid level.
[0022] The detection enable flag is used to indicate whether eSIM support detection is enabled using general input / output pins; the detection pin identifier is the pin identifier of the general input / output pin used for eSIM support detection in the vehicle device; the valid level is the level of the general input / output pin when the vehicle device supports eSIM, which can be 0 or 1, where 0 indicates low level and 1 indicates high level.
[0023] Furthermore, the pin identification includes a pin group number and a pin number; the pin group number is the group number of the port group to which the general-purpose input / output (GPIO) pin belongs, and the pin number is the position number of the GPIO pin within the port group. The GPIO pin used for eSIM support detection can be identified from the onboard device using the pin group number and pin number.
[0024] For determining the target detection parameters corresponding to the target vehicle device based on the configuration file, the specific steps may include: performing a file opening operation on the configuration file; if the configuration file is opened successfully, mapping the detection parameters in the configuration file to a preset memory based on a preset data structure to obtain the mapping data; if the detection parameters corresponding to the target vehicle device are read from the mapping data, determining the target detection parameters corresponding to the target vehicle device based on the read detection parameters; if the configuration file fails to open, or if the detection parameters corresponding to the target vehicle device are not read from the mapping data, determining the target detection parameters corresponding to the target vehicle device based on the default detection parameters.
[0025] It should be noted that if the detection parameters corresponding to the target vehicle device are not read from the mapping data, it means that there are no detection parameters corresponding to the target vehicle device in the configuration file. In this case, in order to enable the detection system to perform eSIM support detection on the target vehicle device in a timely manner, the default detection parameters can be used first, thereby ensuring the normal operation of the detection system and ensuring the backward compatibility of the detection system.
[0026] Step S12: In response to the detection request, determine the target detection pin identifier and target valid level corresponding to the target vehicle device based on the detection enable flag in the target detection parameters; the detection request is a detection request initiated by the target vehicle device to determine whether it supports eSIM locally.
[0027] In this embodiment of the application, the preset detection system receives the detection request initiated by the target vehicle device through the message interface and responds to the detection request in order to determine the target detection pin identifier and target effective level corresponding to the target vehicle device based on the detection enable flag in the target detection parameters.
[0028] Specifically, responding to a detection request may include: parsing the detection request to determine the target request type and target request format; if the target request type is a preset request type and the target request format meets the preset format requirements, then responding to the detection request; if the target request type is not a preset request type or the target request format does not meet the preset format requirements, then returning first response information indicating a request error to the target vehicle device.
[0029] Specifically, the pre-registered detection system registers the request types for detection requests in advance through a message registration mechanism. After receiving a detection request initiated by the target vehicle device through the message interface, it determines the target request type and target request format. If the target request type is a pre-registered request type and the target request format is correct, it responds to the detection request. If the target request type is not a pre-registered request type or the target request format is incorrect, it returns the first response information indicating a request error to the target vehicle device through the message interface.
[0030] When the detection parameters include a detection enable flag, a detection pin identifier, and a valid level, the target detection pin identifier and the target valid level corresponding to the target vehicle-mounted device are determined based on the detection enable flag in the target detection parameters. Specifically, this may include: if the detection enable flag in the target detection parameters is a first preset flag, then the detection pin identifier in the target detection parameters is determined as the target detection pin identifier, and the valid level in the target detection parameters is determined as the target valid level; if the detection enable flag in the target detection parameters is a second preset flag, then the detection pin identifier in the default detection parameters is determined as the target detection pin identifier, and the valid level in the default detection parameters is determined as the target valid level.
[0031] It should be noted that the detection enable flag includes two cases: a first preset flag and a second preset flag. The first preset flag indicates that general input / output pins are enabled for eSIM support detection, while the second preset flag indicates that general input / output pins are not enabled for eSIM support detection. The first and second preset flags can be represented by different characters, such as 0 and 1, A and B, etc.
[0032] Based on this, if the detection enable flag in the target detection parameters is the first preset flag, it indicates that general-purpose input / output pins are enabled for eSIM support detection. In this case, the detection pin identifier in the target detection parameters can be directly determined as the target detection pin identifier, and the valid level in the target detection parameters can be determined as the target valid level. If the detection enable flag in the target detection parameters is the second preset flag, it indicates that general-purpose input / output pins are not enabled for eSIM support detection. In this case, the detection pin identifier in the default detection parameters needs to be determined as the target detection pin identifier, and the valid level in the default detection parameters needs to be determined as the target valid level.
[0033] In this way, by making the detection enable flag configurable, the detection pin identifier and effective level can be flexibly switched between the target detection parameters determined based on the configuration file and the default detection parameters. This not only supports the configurability and flexible selection of detection parameters, but also ensures the backward compatibility of the detection system.
[0034] Step S13: Read the actual level of the target general-purpose input / output pin; the target general-purpose input / output pin is the general-purpose input / output pin in the target vehicle device that corresponds to the target detection pin identifier.
[0035] In this embodiment, after determining the target detection pin identifier and target valid level corresponding to the target vehicle device, the preset detection system first determines the target general-purpose input / output pin corresponding to the target detection pin identifier from the target vehicle device, and then reads the actual level of the target general-purpose input / output pin. By comparing the consistency between the actual level and the target valid level, the system can detect whether the target vehicle device supports eSIM.
[0036] When the detection pin identifier includes the pin group number and pin position number, reading the actual level of the target general-purpose input / output pin can specifically include: performing a preset device opening operation to open the target vehicle device; determining the corresponding target general-purpose input / output pin from the target vehicle device based on the pin group number and pin position number in the target detection pin identifier; and reading the actual level of the target general-purpose input / output pin.
[0037] Specifically, the preset detection system opens the interface through the preset device, turns on the target vehicle device, and determines the corresponding target general input / output pin from the target vehicle device based on the pin group number and pin number in the target detection pin identifier. Then, it reads the actual level of the target general input / output pin through the preset reading interface. After the actual level is read, it turns off the target vehicle device and releases the corresponding resources.
[0038] Step S14: Based on the consistency between the actual level and the target effective level, detect whether the target vehicle device supports eSIM.
[0039] In this embodiment, after reading the actual level of the target general-purpose input / output pin, it is determined whether the actual level is consistent with the target valid level. If the actual level is consistent with the target valid level, the target vehicle device is detected to support eSIM; if the actual level is inconsistent with the target valid level, the target vehicle device is detected to not support eSIM. In this way, this embodiment can accurately reflect the vehicle device's support for eSIM by judging the consistency of the level.
[0040] Furthermore, after detecting whether the target vehicle device supports eSIM based on the consistency between the actual level and the target effective level, the preset detection system can also generate a second response information based on the target detection result; wherein, the target detection result is the detection result of whether the target vehicle device supports eSIM; the second response information is returned to the target vehicle device so that the target vehicle device can determine whether to enable eSIM based on the second response information.
[0041] Furthermore, the preset detection system can achieve unified management and maintenance of detection parameters corresponding to different vehicle-mounted devices through configuration files. Correspondingly, when the preset detection system receives an update instruction for the configuration file, it can update the detection parameters in the configuration file corresponding to the vehicle-mounted devices based on the update instruction, which is simple to maintain and has low cost.
[0042] The update instructions include, but are not limited to, addition instructions and modification instructions; the addition instruction is an instruction generated based on the detection parameters corresponding to the new vehicle device when the preset detection system needs to be adapted to the new vehicle device; the modification instruction is an instruction generated based on the detection parameters corresponding to any vehicle device when the hardware design related to eSIM in any vehicle device changes; any vehicle device can be any one of the different vehicle devices.
[0043] In this way, by updating the detection parameters corresponding to the vehicle-mounted equipment in the configuration file, the detection system can be quickly adapted to newly added vehicle-mounted equipment and vehicle-mounted equipment with changes in hardware design, without modifying the code program of the detection system. The configuration file improves the maintainability and scalability of the detection system, and has low maintenance costs and high adaptability.
[0044] Therefore, this application stores the detection parameters corresponding to different vehicle-mounted devices through configuration files. When the detection system is running on the target vehicle-mounted device, the target detection parameters corresponding to the target vehicle-mounted device can be determined based on the configuration files, thereby realizing the detection of whether the target vehicle-mounted device supports eSIM. In this way, this application manages and maintains the detection parameters corresponding to different vehicle-mounted devices in a unified manner through configuration files, realizing the configurability of detection parameters. It can enable the detection system to quickly adapt to the eSIM support detection of different vehicle-mounted devices without modifying the detection system's code program, resulting in low maintenance costs and high adaptability.
[0045] See Figure 2 , Figure 3 and Figure 4 As shown, this embodiment of the invention discloses an eSIM support detection method, applied to a preset detection system running on a target vehicle-mounted device, comprising: When the preset detection system starts, it performs a file opening operation on the configuration file. If the configuration file opens successfully, the detection parameters in the configuration file are mapped to the preset memory based on the preset data structure to obtain the mapped data. Then, the mapped data is read through the configuration reading module. If the detection parameters corresponding to the target vehicle device (such as detection enable flag, pin group number, pin number, and active level) are read from the mapped data, the target detection parameters corresponding to the target vehicle device are determined based on the read detection parameters. If the configuration file fails to open, or if the detection parameters corresponding to the target vehicle device are not read from the mapped data, the target detection parameters corresponding to the target vehicle device are determined based on the default detection parameters. In the default detection parameters, the detection enable flag is 0, indicating that it is not enabled; the pin group number is 0; the pin number is 0; and the active level is 1, indicating that it is active high.
[0046] After the configuration file is read and the target detection parameters corresponding to the target vehicle device are determined based on the configuration file, the system waits for the target vehicle device to initiate a detection request to determine whether it supports eSIM locally. When the detection request is received from the target vehicle device through the message interface, the detection processing module parses the detection request to determine the target request type and target request format. If the target request type is not the preset request type or the target request format is incorrect, the first response information indicating a request error is returned to the target vehicle device. If the target request type is a preset request type and the target request format is correct, then in response to the detection request, the preset parameter selection logic is executed by checking whether the detection enable flag in the target detection parameters is equal to 1. If the detection enable flag is equal to 1, it means that the detection is enabled. At this time, the pin group number in the target detection parameters is determined as the target pin group number, the pin number in the target detection parameters is determined as the target pin number, and the valid level in the target detection parameters is determined as the target valid level. If the detection enable flag is equal to 0, it means that the detection is not enabled. At this time, the pin group number in the default detection parameters is determined as the target pin group number, the pin number in the default detection parameters is determined as the target pin number, and the valid level in the default detection parameters is determined as the target valid level.
[0047] The target vehicle device is then opened via the interface module. If the target vehicle device is successfully opened, the corresponding target general-purpose input / output (GPIO) pins are determined from the target vehicle device based on the target pin group number and target pin number. The actual level of the target GPIO pins is then read. After the actual level is read, the target vehicle device is closed and the corresponding resources are released. The actual level is then compared with the target valid level using a level comparison module. If the actual level matches the target valid level, the target vehicle device is detected to support eSIM; otherwise, the target vehicle device is detected to not support eSIM. After determining whether the target vehicle device supports eSIM, the detection result is encapsulated to generate a second response information, which is then returned to the target vehicle device so that the target vehicle device can determine whether to enable eSIM based on the second response information.
[0048] Correspondingly, if the target vehicle device fails to open, a third response message indicating the detection failure will be returned to the target vehicle device.
[0049] In this way, this application stores the detection parameters corresponding to different vehicle-mounted devices through configuration files, thereby realizing the configurability of detection parameters, including the configurability of pin group numbers and pin number of general input / output pins, and the configurability of effective levels, etc. In other words, the detection system can flexibly configure detection parameters according to the design of different vehicle-mounted devices through configuration files, without modifying the code program of the detection system, and can quickly adapt to the design of different vehicle-mounted devices using different general input / output pins and different effective levels, effectively improving the flexibility of the detection system.
[0050] Furthermore, this application separates the detection parameters corresponding to the vehicle-mounted equipment from the code of the detection system into a configuration file. The configuration file is used to uniformly manage and maintain the detection parameters corresponding to different vehicle-mounted equipment. Thus, when the detection system needs to be adapted to new vehicle-mounted equipment or vehicle-mounted equipment with changes in hardware design, only the configuration file needs to be updated, without recompiling the code. This allows the same detection system to be adapted to different hardware devices, significantly improving the maintainability and scalability of the detection system, with low maintenance costs. At the same time, it can speed up the detection efficiency of whether the vehicle-mounted equipment supports eSIM, thereby improving the development efficiency and product delivery schedule of the vehicle-mounted equipment during the development phase.
[0051] Secondly, this application uses default detection parameters for eSIM support detection when the configuration file fails to open, or when the configuration file does not contain the detection parameters corresponding to the vehicle device, or when the detection enable flag is disabled. Conversely, when the configuration file opens successfully, contains the detection parameters corresponding to the vehicle device, and the detection enable flag is enabled, the detection parameters in the configuration file are used for eSIM support detection. This ensures that the detection system can perform eSIM support detection for any vehicle device, guaranteeing backward compatibility of the detection system.
[0052] In addition, this application decouples eSIM support detection from the vehicle equipment and integrates eSIM support detection into the detection system. This allows the detection system to perform eSIM support detection on different vehicle equipment through configuration files, enabling detection logic independent of the vehicle equipment and improving the portability of the detection system across different vehicle equipment.
[0053] See Figure 5 As shown, this embodiment of the invention discloses an eSIM-supported detection device, applied to a preset detection system running on a target vehicle-mounted device, comprising: The parameter determination module 11 is used to determine the target detection parameters corresponding to the target vehicle device based on the configuration file; the configuration file is used to store the detection parameters corresponding to different vehicle devices, and the detection parameters are the parameters for detecting whether the vehicle device supports eSIM; The request response module 12 is used to respond to a detection request by determining the target detection pin identifier and target valid level corresponding to the target vehicle device based on the detection enable flag in the target detection parameters; the detection request is a detection request initiated by the target vehicle device to determine whether it supports eSIM locally; Level reading module 13 is used to read the actual level of the target general-purpose input / output pin; the target general-purpose input / output pin is the general-purpose input / output pin in the target vehicle device that corresponds to the target detection pin identifier; The device detection module 14 is used to detect whether the target vehicle device supports eSIM based on the consistency between the actual level and the target effective level.
[0054] Therefore, this application stores the detection parameters corresponding to different vehicle-mounted devices through configuration files. When the detection system is running on the target vehicle-mounted device, the target detection parameters corresponding to the target vehicle-mounted device can be determined based on the configuration files, thereby realizing the detection of whether the target vehicle-mounted device supports eSIM. In this way, this application manages and maintains the detection parameters corresponding to different vehicle-mounted devices in a unified manner through configuration files, realizing the configurability of detection parameters. It can enable the detection system to quickly adapt to the eSIM support detection of different vehicle-mounted devices without modifying the detection system's code program, resulting in low maintenance costs and high adaptability.
[0055] In some specific embodiments, the parameter determination module 11 includes: The file opening unit is used to perform file opening operations on configuration files; The file mapping unit is used to map the detection parameters in the configuration file to a preset memory based on a preset data structure if the configuration file is opened successfully, so as to obtain the mapping data. The first parameter determination unit is used to determine the target detection parameters corresponding to the target vehicle device based on the detection parameters read from the mapping data if the detection parameters corresponding to the target vehicle device are read from the mapping data. The second parameter determination unit is used to determine the target detection parameters corresponding to the target vehicle device based on the default detection parameters if the configuration file fails to open or if the detection parameters corresponding to the target vehicle device are not read from the mapping data.
[0056] In some specific embodiments, the detection parameters include a detection enable flag, a detection pin identifier, and an active level; Accordingly, the request response module 12 includes: The first determining unit is configured to, if the detection enable flag in the target detection parameters is a first preset flag, determine the detection pin identifier in the target detection parameters as the target detection pin identifier, and determine the effective level in the target detection parameters as the target effective level; The second determining unit is configured to, if the detection enable flag in the target detection parameters is a second preset flag, determine the detection pin identifier in the default detection parameters as the target detection pin identifier, and determine the effective level in the default detection parameters as the target effective level.
[0057] In some specific embodiments, the detection pin identifier includes a pin group number and a pin position number; the pin group number is the group number of the port group in which the general-purpose input / output pin is located, and the pin position number is the position number of the general-purpose input / output pin in the port group; Accordingly, the level reading module 13 includes: The device opening unit is used to perform a preset device opening operation to open the target vehicle-mounted device; The pin determination unit is used to determine the corresponding target general-purpose input / output pins from the target vehicle device based on the pin group number and pin position number in the target detection pin identifier; The level reading unit is used to read the actual level of the target general-purpose input / output pin.
[0058] In some specific embodiments, the request-response module 12 includes: The request parsing unit is used to parse the detection request to determine the target request type and target request format of the detection request; A request response unit is configured to respond to the detection request if the target request type is a preset request type and the target request format meets the preset format requirements. The first response return unit is used to return first response information indicating a request error to the target vehicle device if the target request type is not a preset request type or the target request format does not meet the preset format requirements.
[0059] In some specific embodiments, the eSIM-supported detection device further includes: A response information generation unit is used to generate second response information based on the target detection result; wherein, the target detection result is the detection result of whether the target vehicle device supports eSIM; The second response return unit is used to return the second response information to the target vehicle device so that the target vehicle device can determine whether to enable eSIM based on the second response information.
[0060] In some specific embodiments, the eSIM-supported detection device further includes: The file update unit is used to update the detection parameters corresponding to the vehicle-mounted equipment in the configuration file based on the update instruction when an update instruction for the configuration file is obtained. The update instructions include addition instructions and modification instructions; The newly added instruction is an instruction generated based on the detection parameters corresponding to the newly added vehicle-mounted device when the preset detection system needs to be adapted to the newly added vehicle-mounted device; The modification instruction is an instruction generated based on the detection parameters corresponding to any vehicle device when the hardware design related to eSIM in any vehicle device changes; any vehicle device can be any one of the different vehicle devices.
[0061] Furthermore, embodiments of this application also disclose an electronic device, Figure 6This is a structural diagram of an electronic device 20 according to an exemplary embodiment. The content of the diagram should not be construed as limiting the scope of this application.
[0062] Figure 6 This is a schematic diagram of the structure of an electronic device 20 provided in an embodiment of this application. Specifically, the electronic device 20 may include: at least one processor 21, at least one memory 22, a power supply 23, a communication interface 24, an input / output interface 25, and a communication bus 26. The memory 22 stores a computer program, which is loaded and executed by the processor 21 to implement the relevant steps in the eSIM support detection method disclosed in any of the foregoing embodiments. Alternatively, the electronic device 20 in this embodiment may specifically be an electronic computer.
[0063] In this embodiment, the power supply 23 is used to provide operating voltage for each hardware device on the electronic device 20; the communication interface 24 can create a data transmission channel between the electronic device 20 and external devices, and the communication protocol it follows can be any communication protocol applicable to the technical solution of this application, and is not specifically limited here; the input / output interface 25 is used to acquire external input data or output data to the outside world, and its specific interface type can be selected according to specific application needs, and is not specifically limited here.
[0064] In addition, the memory 22, as a carrier for resource storage, can be a read-only memory, random access memory, disk or optical disk, etc. The resources stored thereon can include operating system 221, computer program 222, etc., and the storage method can be temporary storage or permanent storage.
[0065] The operating system 221 is used to manage and control the various hardware devices on the electronic device 20 and the computer program 222, which may be Windows Server, Netware, Unix, Linux, etc. In addition to including a computer program capable of performing the eSIM support detection method executed by the electronic device 20 as disclosed in any of the foregoing embodiments, the computer program 222 may further include a computer program capable of performing other specific tasks.
[0066] Furthermore, this application also discloses a computer-readable storage medium for storing a computer program; wherein, when the computer program is executed by a processor, it implements the aforementioned eSIM support detection method. Specific steps of this method can be found in the corresponding content disclosed in the foregoing embodiments, and will not be repeated here.
[0067] The various embodiments in this specification are described in a progressive manner, with each embodiment focusing on its differences from other embodiments. Similar or identical parts between embodiments can be referred to interchangeably. For the apparatus disclosed in the embodiments, since it corresponds to the method disclosed in the embodiments, the description is relatively simple; relevant parts can be referred to in the method section.
[0068] Those skilled in the art will further recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of both. To clearly illustrate the interchangeability of hardware and software, the components and steps of the various examples have been generally described in terms of functionality in the foregoing description. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.
[0069] The steps of the methods or algorithms described in conjunction with the embodiments disclosed herein can be implemented directly by hardware, a software module executed by a processor, or a combination of both. The software module can be located in random access memory (RAM), main memory, read-only memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, removable disk, CD-ROM, or any other form of storage medium known in the art.
[0070] Finally, it should be noted that in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.
[0071] The technical solutions provided in this application have been described in detail above. Specific examples have been used to illustrate the principles and implementation methods of this application. The descriptions of the above embodiments are only for the purpose of helping to understand the methods and core ideas of this application. At the same time, for those skilled in the art, there will be changes in the specific implementation methods and application scope based on the ideas of this application. Therefore, the content of this specification should not be construed as a limitation of this application.
Claims
1. An eSIM support detection method, characterized in that, A pre-set detection system applied to the target vehicle-mounted equipment includes: The target detection parameters corresponding to the target vehicle device are determined based on the configuration file; the configuration file is used to store the detection parameters corresponding to different vehicle devices, and the detection parameters are the parameters for detecting whether the vehicle device supports eSIM; In response to a detection request, the target detection pin identifier and target valid level corresponding to the target vehicle device are determined based on the detection enable flag in the target detection parameters; the detection request is a detection request initiated by the target vehicle device to determine whether it supports eSIM locally; Read the actual level of the target general-purpose input / output pin; the target general-purpose input / output pin is the general-purpose input / output pin in the target vehicle device that corresponds to the target detection pin identifier; Based on the consistency between the actual voltage level and the target effective voltage level, it is detected whether the target vehicle device supports eSIM.
2. The eSIM support detection method according to claim 1, characterized in that, The step of determining the target detection parameters corresponding to the target vehicle-mounted device based on the configuration file includes: Perform the file opening operation on the configuration file; If the configuration file is opened successfully, the detection parameters in the configuration file are mapped to the preset memory based on the preset data structure to obtain the mapped data; If the detection parameters corresponding to the target vehicle device are read from the mapping data, then the target detection parameters corresponding to the target vehicle device are determined based on the read detection parameters. If the configuration file fails to open, or if the detection parameters corresponding to the target vehicle device are not read from the mapping data, then the target detection parameters corresponding to the target vehicle device are determined based on the default detection parameters.
3. The eSIM support detection method according to claim 2, characterized in that, The detection parameters include the detection enable flag, detection pin identifier, and valid voltage level; Accordingly, determining the target detection pin identifier and target valid level corresponding to the target vehicle-mounted device based on the detection enable flag in the target detection parameters includes: If the detection enable flag in the target detection parameters is a first preset flag, then the detection pin identifier in the target detection parameters is determined as the target detection pin identifier, and the valid level in the target detection parameters is determined as the target valid level; If the detection enable flag in the target detection parameters is the second preset flag, then the detection pin identifier in the default detection parameters is determined as the target detection pin identifier, and the valid level in the default detection parameters is determined as the target valid level.
4. The eSIM support detection method according to claim 3, characterized in that, The detection pin identifier includes the pin group number and the pin position number; the pin group number is the group number of the port group to which the general-purpose input / output pin is located, and the pin position number is the position number of the general-purpose input / output pin in the port group. Accordingly, reading the actual level of the target general-purpose input / output pin includes: Perform a preset device opening operation to open the target vehicle-mounted device; Based on the pin group number and pin position number in the target detection pin identifier, the corresponding target general-purpose input / output pin is determined from the target vehicle device; Read the actual level of the target general-purpose input / output pin.
5. The eSIM support detection method according to claim 1, characterized in that, The response to the detection request includes: The detection request is parsed to determine the target request type and target request format. If the target request type is a preset request type and the target request format meets the preset format requirements, then respond to the detection request; If the target request type is not a preset request type, or the target request format does not meet the preset format requirements, then the first response information indicating a request error will be returned to the target vehicle device.
6. The eSIM support detection method according to claim 1, characterized in that, After detecting whether the target vehicle device supports eSIM based on the consistency between the actual voltage level and the target effective voltage level, the method further includes: A second response is generated based on the target detection result; wherein, the target detection result is the detection result of whether the target vehicle device supports eSIM; The second response information is returned to the target vehicle device so that the target vehicle device can determine whether to enable eSIM based on the second response information.
7. The eSIM support detection method according to any one of claims 1 to 6, characterized in that, Also includes: Upon receiving an update instruction for the configuration file, the detection parameters corresponding to the vehicle-mounted equipment in the configuration file are updated based on the update instruction. The update instructions include addition instructions and modification instructions; The newly added instruction is an instruction generated based on the detection parameters corresponding to the newly added vehicle-mounted device when the preset detection system needs to be adapted to the newly added vehicle-mounted device; The modification instruction is an instruction generated based on the detection parameters corresponding to any vehicle device when the hardware design related to eSIM in any vehicle device changes; any vehicle device can be any one of the different vehicle devices.
8. An eSIM support detection device, characterized in that, A pre-set detection system applied to the target vehicle-mounted equipment includes: The parameter determination module is used to determine the target detection parameters corresponding to the target vehicle device based on the configuration file; the configuration file is used to store the detection parameters corresponding to different vehicle devices, and the detection parameters are the parameters for detecting whether the vehicle device supports eSIM; The request-response module is used to respond to a detection request by determining the target detection pin identifier and target valid level corresponding to the target vehicle device based on the detection enable flag in the target detection parameters; the detection request is a detection request initiated by the target vehicle device to determine whether it supports eSIM locally; A level reading module is used to read the actual level of the target general-purpose input / output pin; the target general-purpose input / output pin is the general-purpose input / output pin in the target vehicle device that corresponds to the target detection pin identifier; The device detection module is used to detect whether the target vehicle device supports eSIM based on the consistency between the actual voltage level and the target effective voltage level.
9. An electronic device, characterized in that, include: Memory, used to store computer programs; A processor for executing the computer program to implement the eSIM support detection method as described in any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that, Used to store a computer program, which, when executed by a processor, implements the eSIM support detection method as described in any one of claims 1 to 7.