A method, device and electronic device for generating vehicle-mounted device identification
Through the on-board device identification generation method executed by the server, the problem of unique identification duplication and inconsistent format caused by inconsistent coding rules of different device manufacturers is solved, and the globally unique and unified format device identification generation is realized, which is suitable for running on multiple devices. business.
Patent Information
- Application Number
- CN202210204620.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-03-03
- Publication Date
- 2024-11-26
- Estimated Expiration
- 2042-03-03
AI Technical Summary
The inconsistent encoding rules of vehicle-mounted equipment of different equipment manufacturers, resulting in the generated unique identifiers that may be duplicated and the format is inconsistent, making it difficult to achieve global uniqueness on multiple devices.
Through the on-board device identification generation method executed by the server, the network request from the vehicle end is received, and a globally unique and unified formatted device identification is generated using the preset global device identification generation strategy, and stored in the device identification database.
It solves the problem that unique identification of devices across multiple device manufacturers may be duplicated, ensuring that businesses running on multiple devices can use globally unique device identification, and unify the device identification format.
Smart Images

Figure CN114580033B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of vehicle-mounted equipment, and in particular to a method, device and electronic device for generating a vehicle-mounted equipment identifier. Background Art
[0002] With the rapid development of the field of intelligent vehicles, more and more connected vehicles are driving on daily roads. These vehicles form a huge Internet of Vehicles, and many intelligent devices are installed in vehicles. In order to uniquely distinguish or locate these intelligent vehicles or devices, it is necessary to set a unique and non-repetitive code that complies with the established coding rules in the hardware device or system to uniquely identify the device. These intelligent devices generally include car computers, driving recorders or other OBU (Onboard Unit) vehicle-mounted devices.
[0003] However, different equipment manufacturers have their own coding rules, which may be similar or identical. Coding rules can generally ensure that the identifiers generated on a device are not repeated. However, when a unique identifier is required on multiple devices, duplication may occur. For example, manufacturer A has its own SN (Serial number) coding rules for car computers, and manufacturer B has its own SN coding rules for car computers. The SNs generated by the two may be repeated.
[0004] In addition, the encoding formats constrained by the encoding rules of different equipment manufacturers may be different, which leads to inconsistent unique identification formats in different devices, such as some are 15 digits, some are 18 digits, etc. When the unique identification rules need to be used to meet business needs, there will be many rules or complex parsing. Summary of the invention
[0005] The embodiments of the present application provide a method, apparatus and electronic device for generating a vehicle-mounted device identifier, so as to provide a globally unique device identifier with a uniform format for vehicle-mounted devices of different device manufacturers.
[0006] The present application embodiment adopts the following technical solutions:
[0007] In a first aspect, an embodiment of the present application provides a method for generating a vehicle-mounted device identifier, wherein the method is executed by a server, and the method includes:
[0008] Receiving a network request from the vehicle, wherein the network request includes a device channel keyword and an original device identifier;
[0009] Determining, according to the network request, whether a global device identifier corresponding to the network request exists in a device identifier database;
[0010] In the case that the global device identification corresponding to the network request does not exist in the device identification database, generating a global device identification corresponding to the network request by using a preset global device identification generation strategy;
[0011] The global device identification is returned to the vehicle end, and the global device identification is stored in the device identification database in correspondence with the device channel keyword and the original device identification.
[0012] Optionally, before receiving the network request from the vehicle side, the method further includes:
[0013] Register device channel keywords for each vehicle end;
[0014] According to the device channel keyword of each vehicle terminal, a device channel identifier is assigned to each vehicle terminal;
[0015] The device channel keyword of each vehicle terminal and the device channel identification are correspondingly stored in the device identification database.
[0016] Optionally, after receiving the network request from the vehicle side, the method further includes:
[0017] Determining whether the device channel keyword exists in the device identification database;
[0018] If so, executing the step of determining whether there is a global device identification corresponding to the network request in a device identification database according to the network request;
[0019] If it does not exist, an error message is returned.
[0020] Optionally, the generating a global device identifier corresponding to the network request by using a preset global device identifier generation strategy includes:
[0021] According to the device channel keyword, determining a corresponding device channel identifier in the device identifier database;
[0022] Get the current server system time;
[0023] A global device identifier corresponding to the network request is generated according to the device channel identifier and the current server system time.
[0024] Optionally, generating a global device identifier corresponding to the network request according to the device channel identifier and the current server system time includes:
[0025] Processing the original device identifier based on a preset digest algorithm to obtain a random character string;
[0026] A global device identifier corresponding to the network request is generated according to the device channel identifier, the current server system time, and the random character string.
[0027] Optionally, after determining, according to the network request, whether there is a global device identification corresponding to the network request in a device identification database, the method further includes:
[0028] In the case that the global device identification corresponding to the network request exists in the device identification database, the global device identification corresponding to the network request in the device identification database is directly returned to the vehicle end.
[0029] In a second aspect, an embodiment of the present application further provides a method for obtaining a vehicle-mounted device identification, wherein the method is executed by a vehicle end, and the method includes:
[0030] Determine whether the global device identifier of the vehicle-mounted device can be obtained locally on the vehicle side;
[0031] In the case where the global device identifier of the vehicle-mounted device cannot be obtained locally on the vehicle side, a network request is sent to the server side, where the network request is used to obtain the device identifier of the vehicle side, and the network request includes a device channel keyword and an original device identifier;
[0032] Receive the global device identification of the vehicle-mounted device returned by the server and store it locally on the vehicle side;
[0033] The global device identification of the vehicle-mounted device is obtained based on any of the aforementioned vehicle-mounted device identification generation methods.
[0034] In a third aspect, an embodiment of the present application further provides a vehicle-mounted device identification generation device, wherein the device is applied to a server, and the device includes:
[0035] A receiving unit, configured to receive a network request from a vehicle end, wherein the network request is used to obtain a device identification from the vehicle end, and the network request includes a device channel keyword and an original device identification;
[0036] A first determining unit, configured to determine, according to the network request, whether a global device identifier corresponding to the network request exists in a device identifier database;
[0037] A generating unit, configured to generate a global device identifier corresponding to the network request by using a preset global device identifier generating strategy when there is no global device identifier corresponding to the network request in the device identifier database;
[0038] The first storage unit is used to return the global device identification to the vehicle end, and store the global device identification, the device channel keyword and the original device identification in the device identification database in correspondence with each other.
[0039] In a fourth aspect, an embodiment of the present application further provides a vehicle-mounted device identification acquisition device, wherein the device is applied to a vehicle end, and the device includes:
[0040] A second determination unit is used to determine whether the global device identification of the vehicle-mounted device can be obtained locally from the vehicle end;
[0041] A sending unit, configured to send a network request to a server when the global device identifier of the vehicle-mounted device cannot be obtained locally from the vehicle end, wherein the network request is used to obtain the device identifier of the vehicle end, and the network request includes a device channel keyword and an original device identifier;
[0042] A receiving unit, used for receiving the global device identification of the vehicle-mounted device returned by the server and storing it locally on the vehicle side;
[0043] The global device identification of the vehicle-mounted device is obtained based on the aforementioned vehicle-mounted device identification generating device.
[0044] In a fifth aspect, an embodiment of the present application further provides an electronic device, including:
[0045] Processor; and
[0046] A memory arranged to store computer executable instructions, wherein when the executable instructions are executed, the processor executes any of the aforementioned methods for generating a vehicle-mounted device identification, or executes the aforementioned method for acquiring a vehicle-mounted device identification.
[0047] In the sixth aspect, an embodiment of the present application also provides a computer-readable storage medium, which stores one or more programs. When the one or more programs are executed by an electronic device including multiple application programs, the electronic device executes any of the aforementioned vehicle-mounted device identification generation methods, or executes the aforementioned vehicle-mounted device identification acquisition methods.
[0048] At least one of the above technical solutions adopted in the embodiments of the present application can achieve the following beneficial effects: the vehicle-mounted device identification generation method of the embodiment of the present application is executed by the server, which first receives a network request from the vehicle, the network request is used to obtain the device identification of the vehicle, and the network request includes a device channel keyword and an original device identification; then, according to the network request, it is determined whether there is a global device identification corresponding to the network request in the device identification database; then, if there is no global device identification corresponding to the network request in the device identification database, a global device identification corresponding to the network request is generated using a preset global device identification generation strategy; finally, the global device identification is returned to the vehicle, and the global device identification is stored in the device identification database in correspondence with the device channel keyword and the original device identification. The vehicle-mounted device identification generation method of the embodiment of the present application generates a globally unique and uniformly formatted device identification for vehicle-mounted devices of different equipment manufacturers, solving the problem that device unique identifications across multiple equipment manufacturers may be repeated, and that services or applications that need to run on multiple devices do not have a global unique device identification. BRIEF DESCRIPTION OF THE DRAWINGS
[0049] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:
[0050] Figure 1 A schematic diagram of a process for generating a vehicle-mounted device identification in an embodiment of the present application;
[0051] Figure 2 This is a schematic diagram of a process for constructing device channel information in an embodiment of the present application;
[0052] Figure 3 This is a schematic diagram of a vehicle-mounted device identification generation process in an embodiment of the present application;
[0053] Figure 4 A schematic diagram of a process for obtaining a vehicle-mounted device identification in an embodiment of the present application;
[0054] Figure 5 This is a schematic diagram of a process for obtaining a vehicle-mounted device identification in an embodiment of the present application;
[0055] Figure 6 This is a schematic diagram of the structure of a vehicle-mounted device identification generating device in an embodiment of the present application;
[0056] Figure 7 This is a structural schematic diagram of a vehicle-mounted device identification acquisition device in an embodiment of the present application;
[0057] Figure 8 This is a schematic diagram of the structure of an electronic device in an embodiment of the present application;
[0058] Fig. 9 It is a schematic diagram of the structure of another electronic device in an embodiment of the present application. DETAILED DESCRIPTION
[0059] In order to make the purpose, technical solution and advantages of the present application clearer, the technical solution of the present application will be clearly and completely described below in combination with the specific embodiments of the present application and the corresponding drawings. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present application.
[0060] The technical solutions provided by various embodiments of the present application are described in detail below in conjunction with the accompanying drawings.
[0061] The present application embodiment provides a method for generating a vehicle-mounted device identifier, such as Figure 1 As shown, a flow chart of a method for generating a vehicle-mounted device identifier in an embodiment of the present application is provided. The method is executed by a server, and the method at least includes the following steps S110 to S140:
[0062] Step S110, receiving a network request from the vehicle side, wherein the network request is used to obtain a device identification from the vehicle side, and the network request includes a device channel keyword and an original device identification.
[0063] The vehicle-mounted device identification generation method of the embodiment of the present application can be executed by the server. When generating the vehicle-mounted device identification, it is necessary to first receive a network request from the vehicle. The network request here can be understood as a request for obtaining the vehicle-side device identification, that is, the vehicle can request the server to obtain the unique identification of the vehicle-mounted device according to actual business needs. The network request needs to carry parameters such as the device channel keyword and the original device identification. The device channel keyword can be understood as keyword information used to distinguish different device manufacturers. For example, the device channel keyword of device manufacturer A is "bydauto", and the device channel keyword of device manufacturer B is "baicmotor". The original device identification can be understood as the unique device identification generated by each device manufacturer based on its customized coding rules, namely, the device ID.
[0064] The device channel keyword can be used to locate a specific device manufacturer, and the original device identifier can be used to locate a specific device within the device manufacturer.
[0065] The above-mentioned vehicle-mounted device identification can be the SN code of the device, that is, the product serial number, which is a concept introduced to verify the "legal identity of the product". It is an identification used to protect the user's genuine rights and interests and enjoy legal services. The vehicle-mounted device identification can also be ICCID (Integrate circuit card identity, integrated circuit card identification code, that is, SIM card number, which is equivalent to the ID card of the mobile phone number. The vehicle-mounted device identification can also be IMEI (International Mobile Equipment Identity), which is commonly referred to as the mobile phone serial number or mobile phone "serial number", which is used to identify each independent mobile phone and other mobile communication devices in the mobile phone network, which is equivalent to the ID card of the mobile phone. The vehicle-mounted device identification can also be Android ID, which is the unique identification of the Android system.
[0066] Of course, in addition to the several types of device identification listed above, the vehicle-mounted device identification generation method of the embodiment of the present application can also be applied to more other types of device identifications. Technical personnel in this field can flexibly choose to maintain the compatibility of the device identification.
[0067] Step S120: determining, according to the network request, whether there is a global device identification corresponding to the network request in a device identification database.
[0068] After receiving the network request, you can query whether there is a global device identifier corresponding to the network request in the pre-established device identification database. The global device identifier here can be understood as a device identifier generated by the vehicle-mounted device identification generation method based on the embodiment of the present application, which is globally unique.
[0069] If it can be queried, it means that a globally unique identifier has been generated for the device of the device manufacturer before. In order to avoid the situation where the same device is assigned multiple different globally unique identifiers, there is no need to perform subsequent device identifier generation operations. If it cannot be queried, it means that the device of the device manufacturer does not have a corresponding globally unique identifier, then it is necessary to perform subsequent device identifier generation operations.
[0070] Step S130: when there is no global device identifier corresponding to the network request in the device identifier database, a global device identifier corresponding to the network request is generated using a preset global device identifier generation strategy.
[0071] If the global device identifier corresponding to the network request cannot be found in the device identifier database, a pre-set global device identifier generation strategy can be used to generate a unique global device identifier for the device of the device manufacturer. The preset global device identifier generation strategy here can be used to unify the number of bits and styles of the encoding, and different situations can be distinguished by using different numbers, letters or symbols to represent different meanings in different bits. Of course, those skilled in the art can also flexibly define it according to actual needs, as long as the generated identifier can be guaranteed to be globally unique and in a unified format.
[0072] Step S140, returning the global device identification to the vehicle end, and storing the global device identification, the device channel keyword and the original device identification in the device identification database in correspondence with each other.
[0073] After obtaining the newly generated global device identifier, on the one hand, the newly generated global device identifier needs to be returned to the vehicle side so that the vehicle side can perform subsequent business processing and other operations. On the other hand, the newly generated global device identifier needs to be stored in the device identifier database in correspondence with the device channel keyword and the original device identifier in the network request, that is, a relationship mapping is established between the original device identifier and the newly generated global device identifier. For example, an original device identifier of device manufacturer A is BYD1000100001, which can be mapped to the newly generated global device identifier X0120211203ABCDEFG. The newly generated global device identifier can ensure the uniqueness of the device identifier among all different device manufacturers. When the vehicle side requests the device identifier of the device again in the future, the newly generated global device identifier can be used to replace the original device identifier.
[0074] The vehicle-mounted device identification generation method of the embodiment of the present application generates a globally unique device identification with a uniform format for vehicle-mounted devices of different equipment manufacturers, thereby solving the problem of possible duplication of device unique identifications across multiple equipment manufacturers, and the problem of services or applications that need to run on multiple devices not having a global device unique identification.
[0075] In one embodiment of the present application, before receiving a network request from the vehicle end, the method also includes: registering a device channel keyword for each vehicle end; assigning a device channel identifier to each vehicle end according to the device channel keyword of each vehicle end; and storing the device channel keyword of each vehicle end and the device channel identifier in the device identifier database accordingly.
[0076] Before generating a global device identifier, the embodiment of the present application may first establish corresponding device channel information for different device manufacturers as a basis for subsequently generating a global device identifier, such as Figure 2 As shown, a schematic diagram of the construction process of device channel information in an embodiment of the present application is provided.
[0077] First, create corresponding device channels for different device manufacturers' car machines, for example, create device manufacturer A channel and device manufacturer B channel. Then, register corresponding device channel keywords for different device channels, for example, register the device channel keyword "bydauto" for device manufacturer A channel and register the device channel keyword "baicmotor" for device manufacturer B channel. Only the registered device channel keywords can generate subsequent global device identifiers.
[0078] After that, a device channel identifier is assigned to each device channel keyword. The generation rules of the device channel identifier can be customized. For example, the device channel keyword "bydauto" is assigned the device channel identifier "X01", the device channel keyword "baicmotor" is assigned the device channel identifier "X02", and so on. Finally, the device channel keywords and device channel identifiers obtained above are stored in the device identifier database in correspondence, thereby completing the construction process of the device channel information.
[0079] In one embodiment of the present application, after receiving the network request from the vehicle side, the method further includes: determining whether the device channel keyword exists in the device identification database; if so, executing the step of determining whether there is a global device identification corresponding to the network request in the device identification database according to the network request; if not, returning an error prompt message.
[0080] After receiving the network request from the vehicle, the embodiment of the present application can first use the device channel keyword carried in the network request to query the above-mentioned device identification database. If it can be queried, it means that the device manufacturer corresponding to the request has registered the corresponding device channel keyword, and then the subsequent global device identification generation operation can be further performed. If it cannot be queried, it means that the device manufacturer has not registered the device channel keyword, and then the subsequent global device identification generation operation cannot be performed at this time, so the error prompt information can be directly returned.
[0081] In one embodiment of the present application, the use of a preset global device identifier generation strategy to generate a global device identifier corresponding to the network request includes: determining a corresponding device channel identifier in the device identifier database based on the device channel keyword; obtaining the current server system time; and generating a global device identifier corresponding to the network request based on the device channel identifier and the current server system time.
[0082] An embodiment of the present application provides a preset global device identification generation strategy. Specifically, the corresponding device channel identification is first queried in the device identification database according to the device channel keyword. For example, the device channel identification corresponding to the device channel keyword "bydauto" queried in the device identification database is "X01". The device channel identification is used to distinguish different device channels or device manufacturers in the form of an identification, and can be flexibly defined according to actual business needs.
[0083] Then, you can also add the server system time when the global device ID is generated after the device channel ID. Finally, generate the global device ID corresponding to the network request based on the device channel ID and the current server system time. In this way, no matter how many values the original device ID has, you can find the corresponding value in the new rules and ensure that there will be no duplication. For example, the newly generated global device ID can be in the format of X**20211101**********. As time goes by, the time part in the middle will always be different, so it can be guaranteed that the newly generated global device ID will never be repeated, similar to the self-increment of the ID.
[0084] In one embodiment of the present application, generating a global device identifier corresponding to the network request based on the device channel identifier and the current server system time includes: processing the original device identifier based on a preset digest algorithm to obtain a random string; generating a global device identifier corresponding to the network request based on the device channel identifier, the current server system time and the random string.
[0085] Based on the foregoing embodiment, the last "**********" part in "X**20211101**********" can be generated according to the original device identifier. Here, you can refer to the use of digest algorithms, such as MD (Message Digest) message digest, SHA (Secure Hash Algorithm) secure hash algorithm, MAC (Message Authentication Code) message authentication code and other algorithms to generate a random string of fixed length, which has higher generation efficiency than ordinary random string generation methods.
[0086] In addition, one situation that needs to be explained is that if the original device identifiers generated by two device manufacturers are exactly the same, then the random string part obtained according to the above-mentioned digest algorithm adopted in the embodiment of the present application may be the same, but because the previous "X**" part represents the device channel, even if the subsequent random string part is the same, two different global device identifiers can still be generated according to the previous "X**" part. Therefore, the generation efficiency of the global device identifier is higher and the applicability is more flexible. This is also one of the advantages of the preset global device identifier generation strategy designed in this application.
[0087] Of course, in addition to the above method, the embodiment of the present application may not generate a random string based on the original device identification, but may adopt an ordinary random string generation method. After each random string is generated, it can be determined whether the generated random string is repeated with the previously generated random string. If repeated, it can be regenerated.
[0088] In one embodiment of the present application, after determining whether there is a global device identification corresponding to the network request in the device identification database based on the network request, the method further includes: if there is a global device identification corresponding to the network request in the device identification database, directly returning the global device identification corresponding to the network request in the device identification database to the vehicle end.
[0089] As mentioned above, if the global device identifier corresponding to the network request already exists in the device identifier database, then the corresponding global device identifier can be directly returned to the vehicle side. Compared with the use of UUID (Universally Unique Identifier), the global device identifier generated by the same original device identifier can be guaranteed to be consistent, thereby avoiding the situation where the same device may be assigned multiple different global device identifiers, which facilitates the subsequent processing of vehicle-side services.
[0090] In order to facilitate the understanding of the above embodiments, Figure 3As shown, a schematic diagram of a vehicle-mounted device identification generation process in an embodiment of the present application is provided. First, the server receives a network request from the vehicle, and the request carries parameters such as the device channel keyword and the original device identification device ID. Then, the device identification database is checked to see whether the device channel keyword exists. If not, an error code is directly returned. If it exists, the device identification database is further checked to see whether the device channel keyword and the original device identification have generated a corresponding global device identification. If so, the corresponding global device identification is directly returned. If it does not exist, a new global device identification needs to be generated using a preset global device identification generation strategy. Finally, the new global device identification is stored in the device identification database in correspondence with the device channel keyword and the original device identification.
[0091] The vehicle-mounted device identification generation method of the embodiment of the present application solves the problem of possible duplication of unique device identifications across multiple device manufacturers, and solves the problem that services that need to be run on multiple devices do not have a global unique device identification. For example, a certain vehicle-mounted APP needs to be run on the vehicle computer of device manufacturer A and the vehicle computer of device manufacturer B, as well as devices and systems such as driving recorders. The service itself has no activation binding constraints and functions, so a globally unique device identification is needed to distinguish different users, so as to know which device or user generated the service data, and save it for subsequent inquiries.
[0092] In addition, the vehicle-mounted device identification generation method of the embodiment of the present application also solves the problem of inconsistent device identification rules of multiple device manufacturers, resulting in inconsistent unique identification digits and styles.
[0093] The present application also provides a method for obtaining a vehicle-mounted device identification. Figure 4 As shown, a flow chart of a method for obtaining a vehicle-mounted device identification in an embodiment of the present application is provided. The method is executed by the vehicle end, and the method at least includes the following steps S410 to S430:
[0094] Step S410, determining whether the global device identification of the vehicle-mounted device can be obtained locally from the vehicle end;
[0095] Step S420, when the global device identifier of the vehicle-mounted device cannot be obtained from the local device of the vehicle, a network request is sent to the server, where the network request is used to obtain the device identifier of the vehicle, and the network request includes a device channel keyword and an original device identifier;
[0096] Step S430, receiving the global device identification of the vehicle-mounted device returned by the server and storing it locally on the vehicle side; wherein the global device identification of the vehicle-mounted device is obtained based on any of the aforementioned vehicle-mounted device identification generation methods.
[0097] like Figure 5 As shown, a schematic diagram of a vehicle-mounted device identification acquisition process in an embodiment of the present application is provided. First, the vehicle-side preferentially obtains the global device identification of the desired vehicle-mounted device from its own local storage. If there is no corresponding global device identification in the local storage, the device channel keyword set in the vehicle-side APP can be used together with the original device identification device ID as a parameter to pass to the server to obtain the global device identification from the server, and finally the global device identification returned by the server is received and stored locally on the vehicle side for subsequent use. The local storage method of the vehicle-side APP is not limited, and can be a file or Android lightweight data storage SharedPreferences, etc.
[0098] The embodiment of the present application also provides a vehicle-mounted device identification generating device 600, such as Figure 6 As shown, a schematic diagram of the structure of a vehicle-mounted device identification generating device in an embodiment of the present application is provided, the device 600 is applied to the server, and the device 600 includes: a receiving unit 610, a first determining unit 620, a generating unit 630 and a first storage unit 640, wherein:
[0099] A receiving unit 610 is used to receive a network request from the vehicle end, wherein the network request includes a device channel keyword and an original device identifier;
[0100] A first determining unit 620 is used to determine whether there is a global device identifier corresponding to the network request in a device identifier database according to the network request;
[0101] A generating unit 630 is configured to generate a global device identifier corresponding to the network request by using a preset global device identifier generation strategy when there is no global device identifier corresponding to the network request in the device identifier database;
[0102] The first storage unit 640 is used to return the global device identification to the vehicle end, and store the global device identification, the device channel keyword and the original device identification in the device identification database in correspondence with each other.
[0103] In one embodiment of the present application, the device also includes: a registration unit, used to register a device channel keyword for each vehicle terminal; an allocation unit, used to allocate a device channel identifier for each vehicle terminal according to the device channel keyword of each vehicle terminal; and a second storage unit, used to store the device channel keyword of each vehicle terminal and the device channel identifier in the device identification database.
[0104] In one embodiment of the present application, the device also includes: a third determination unit, used to determine whether the device channel keyword exists in the device identification database; if so, executing the step of determining whether there is a global device identification corresponding to the network request in the device identification database according to the network request; if not, returning an error prompt message.
[0105] In one embodiment of the present application, the generation unit 630 is specifically used to: determine the corresponding device channel identifier in the device identification database according to the device channel keyword; obtain the current server system time; and generate a global device identifier corresponding to the network request according to the device channel identifier and the current server system time.
[0106] In one embodiment of the present application, the generation unit 630 is specifically used to: process the original device identifier based on a preset digest algorithm to obtain a random string; generate a global device identifier corresponding to the network request according to the device channel identifier, the current server system time and the random string.
[0107] In one embodiment of the present application, the device also includes: a returning unit, which is used to directly return the global device identification corresponding to the network request in the device identification database to the vehicle end when there is a global device identification corresponding to the network request in the device identification database.
[0108] It can be understood that the above-mentioned vehicle-mounted device identification generation device can implement each step of the vehicle-mounted device identification generation method provided in the aforementioned embodiment, and the relevant explanations about the vehicle-mounted device identification generation method are applicable to the vehicle-mounted device identification generation device, which will not be repeated here.
[0109] The embodiment of the present application also provides a vehicle-mounted device identification acquisition device 700, such as Figure 7 As shown, a schematic diagram of the structure of a vehicle-mounted device identification acquisition device in an embodiment of the present application is provided. The device is applied to a vehicle end. The device 700 includes: a second determination unit 710, a sending unit 720 and a receiving unit 730, wherein:
[0110] The second determining unit 710 is used to determine whether the global device identification of the vehicle-mounted device can be obtained locally from the vehicle end;
[0111] The sending unit 720 is used to send a network request to the server when the global device identifier of the vehicle-mounted device cannot be obtained from the local device of the vehicle. The network request is used to obtain the device identifier of the vehicle. The network request includes a device channel keyword and an original device identifier.
[0112] The receiving unit 730 is used to receive the global device identification of the vehicle-mounted device returned by the server and store it locally on the vehicle side;
[0113] The global device identification of the vehicle-mounted device is obtained based on the aforementioned vehicle-mounted device identification generating device.
[0114] It can be understood that the above-mentioned vehicle-mounted device identification acquisition device can implement each step of the vehicle-mounted device identification acquisition method provided in the aforementioned embodiment, and the relevant explanations about the vehicle-mounted device identification acquisition method are applicable to the vehicle-mounted device identification acquisition device, which will not be repeated here.
[0115] Figure 8 is a schematic diagram of the structure of an electronic device in an embodiment of the present application, Fig. 9 This is a schematic diagram of the structure of another electronic device in the embodiment of the present application. Figure 8 and Fig. 9 At the hardware level, the electronic device includes a processor, and optionally also includes an internal bus, a network interface, and a memory. The memory may include a memory, such as a high-speed random access memory (RAM), and may also include a non-volatile memory (non-volatile memory), such as at least one disk storage. Of course, the electronic device may also include hardware required for other services.
[0116] The processor, network interface and memory can be interconnected through an internal bus, which can be an ISA (Industry Standard Architecture) bus, a PCI (Peripheral Component Interconnect) bus or an EISA (Extended Industry Standard Architecture) bus. The bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 8 and Fig. 9 Only one bidirectional arrow is used in the diagram, but this does not mean that there is only one bus or only one type of bus.
[0117] The memory is used to store the program. Specifically, the program may include a program code, and the program code includes a computer operation instruction. The memory may include a memory and a non-volatile memory, and provides instructions and data to the processor.
[0118] The processor reads the corresponding computer program from the non-volatile memory into the memory and then runs it, forming a vehicle-mounted device identification generation device or a vehicle-mounted device identification acquisition device at the logical level. The processor executes the program stored in the memory and is specifically used to perform the following operations:
[0119] Receiving a network request from the vehicle side, the network request being used to obtain a device identification from the vehicle side, the network request including a device channel keyword and an original device identification;
[0120] Determining, according to the network request, whether a global device identifier corresponding to the network request exists in a device identifier database;
[0121] In the case that the global device identification corresponding to the network request does not exist in the device identification database, generating a global device identification corresponding to the network request by using a preset global device identification generation strategy;
[0122] The global device identification is returned to the vehicle end, and the global device identification is stored in the device identification database in correspondence with the device channel keyword and the original device identification.
[0123] Or, to execute:
[0124] Determine whether the global device identifier of the vehicle-mounted device can be obtained locally on the vehicle side;
[0125] In the case where the global device identification of the vehicle-mounted device cannot be obtained locally on the vehicle side, a network request is sent to the server side, where the network request is used to obtain the device identification of the vehicle side, and the network request includes a device channel keyword and an original device identification;
[0126] Receive the global device identification of the vehicle-mounted device returned by the server and store it locally on the vehicle side;
[0127] The global device identification of the vehicle-mounted device is obtained based on any of the aforementioned methods.
[0128] The above application Figure 1 The vehicle-mounted device identification generating device disclosed in the embodiment shown and the present application Figure 4The method performed by the vehicle-mounted equipment identification acquisition device disclosed in the illustrated embodiment can be applied to a processor or implemented by a processor. The processor may be an integrated circuit chip with signal processing capabilities. In the implementation process, each step of the above method can be completed by an integrated logic circuit of hardware in the processor or an instruction in software form. The above processor can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components. The methods, steps and logic block diagrams disclosed in the embodiments of the present application can be implemented or executed. The general-purpose processor can be a microprocessor or the processor can also be any conventional processor, etc. The steps of the method disclosed in the embodiments of the present application can be directly embodied as a hardware decoding processor for execution, or a combination of hardware and software modules in the decoding processor for execution. The software module can be located in a mature storage medium in the field such as random access memory, flash memory, read-only memory, programmable read-only memory or electrically erasable programmable memory, register, etc. The storage medium is located in the memory, and the processor reads the information in the memory and completes the steps of the above method in combination with its hardware.
[0129] The electronic device may also perform Figure 1 The method executed by the vehicle-mounted device identification generation device in the vehicle-mounted device identification generation device is realized Figure 1 The functions of the embodiments shown can also be performed Figure 4 The method performed by the vehicle-mounted device identification acquisition device disclosed in the embodiment shown in the figure is implemented by the vehicle-mounted device identification acquisition device in Figure 4 The functions of the illustrated embodiment will not be described in detail in the embodiments of the present application.
[0130] The present application also provides a computer-readable storage medium, which stores one or more programs, wherein the one or more programs include instructions, which, when executed by an electronic device including multiple application programs, enable the electronic device to execute Figure 1 The method executed by the vehicle-mounted device identification generating device in the illustrated embodiment is specifically used to execute:
[0131] Receiving a network request from the vehicle side, the network request being used to obtain a device identification from the vehicle side, the network request including a device channel keyword and an original device identification;
[0132] Determining, according to the network request, whether a global device identifier corresponding to the network request exists in a device identifier database;
[0133] In the case that the global device identification corresponding to the network request does not exist in the device identification database, generating a global device identification corresponding to the network request by using a preset global device identification generation strategy;
[0134] The global device identification is returned to the vehicle end, and the global device identification is stored in the device identification database in correspondence with the device channel keyword and the original device identification.
[0135] In addition, the electronic device can also be made to perform Figure 7 The method performed by the vehicle-mounted device identification acquisition device in the illustrated embodiment is specifically used to perform:
[0136] Determine whether the global device identifier of the vehicle-mounted device can be obtained locally on the vehicle side;
[0137] In the case where the global device identification of the vehicle-mounted device cannot be obtained locally on the vehicle side, a network request is sent to the server side, where the network request is used to obtain the device identification of the vehicle side, and the network request includes a device channel keyword and an original device identification;
[0138] Receive the global device identification of the vehicle-mounted device returned by the server and store it locally on the vehicle side;
[0139] The global device identification of the vehicle-mounted device is obtained based on any of the aforementioned methods.
[0140] It will be appreciated by those skilled in the art that embodiments of the present invention may be provided as methods, systems, or computer program products. Therefore, the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Furthermore, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0141] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0142] These computer program instructions may also be stored in a computer readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer readable memory produce an article of manufacture including an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0143] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process in the computer or other programmable device. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0144] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.
[0145] Memory may include non-permanent storage in a computer-readable medium, in the form of random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM. Memory is an example of a computer-readable medium.
[0146] Computer readable media include permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. Information can be computer readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer readable media does not include temporary computer readable media (transitory media), such as modulated data signals and carrier waves.
[0147] It should also be noted that the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, commodity or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, commodity or device. In the absence of more restrictions, the elements defined by the sentence "comprises a ..." do not exclude the existence of other identical elements in the process, method, commodity or device including the elements.
[0148] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems or computer program products. Therefore, the present application may take the form of a complete hardware embodiment, a complete software embodiment or an embodiment combining software and hardware. Moreover, the present application may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program codes.
[0149] The above is only an embodiment of the present application and is not intended to limit the present application. For those skilled in the art, the present application may have various changes and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included in the scope of the claims of the present application.
Claims
1. A method for generating a vehicle-mounted device identification, in, The method is executed by the server, and includes: Receiving a network request from the vehicle side, the network request being used to obtain a device identification from the vehicle side, the network request including a device channel keyword and an original device identification; Determining, according to the network request, whether a global device identifier corresponding to the network request exists in a device identifier database; In the case that the global device identification corresponding to the network request does not exist in the device identification database, generating a global device identification corresponding to the network request by using a preset global device identification generation strategy; Returning the global device identification to the vehicle end, and storing the global device identification, the device channel keyword and the original device identification in the device identification database in correspondence; Before receiving the network request from the vehicle, the method further includes: Register device channel keywords for each vehicle end; According to the device channel keyword of each vehicle terminal, a device channel identifier is assigned to each vehicle terminal; The device channel keyword and the device channel identifier of each vehicle terminal are stored in the device identifier database; The device channel keyword refers to keyword information used to distinguish different device manufacturers, and the device channel identifier is identifier information used to distinguish different device manufacturers; After receiving the network request from the vehicle, the method further includes: Determining whether the device channel keyword exists in the device identification database; If so, executing the step of determining whether there is a global device identification corresponding to the network request in a device identification database according to the network request; If it does not exist, an error message is returned; The generating of the global device identifier corresponding to the network request by using the preset global device identifier generation strategy includes: According to the device channel keyword, determining a corresponding device channel identifier in the device identifier database; Get the current server system time; Generate a global device identifier corresponding to the network request according to the device channel identifier and the current server system time; Processing the original device identifier based on a preset digest algorithm to obtain a random character string; A global device identifier corresponding to the network request is generated according to the device channel identifier, the current server system time, and the random character string.
2. The method according to claim 1, in, After determining, according to the network request, whether there is a global device identification corresponding to the network request in a device identification database, the method further includes: In the case that the global device identification corresponding to the network request exists in the device identification database, the global device identification corresponding to the network request in the device identification database is directly returned to the vehicle end.
3. A method for obtaining a vehicle-mounted device identification, in, The method is executed by the vehicle end, and the method includes: Determine whether the global device identifier of the vehicle-mounted device can be obtained locally on the vehicle side; In the case where the global device identifier of the vehicle-mounted device cannot be obtained locally on the vehicle side, a network request is sent to the server side, where the network request is used to obtain the device identifier of the vehicle side, and the network request includes a device channel keyword and an original device identifier; Receive the global device identification of the vehicle-mounted device returned by the server and store it locally on the vehicle side; Wherein, the global device identification of the vehicle-mounted device is obtained based on any of the methods described in claims 1 to 2 above.
4. A vehicle-mounted equipment identification generating device, in, The device is applied to a server, and includes: A receiving unit, configured to receive a network request from a vehicle end, wherein the network request is used to obtain a device identification from the vehicle end, and the network request includes a device channel keyword and an original device identification; A first determining unit, configured to determine, according to the network request, whether a global device identifier corresponding to the network request exists in a device identifier database; A generating unit, configured to generate a global device identifier corresponding to the network request by using a preset global device identifier generating strategy when there is no global device identifier corresponding to the network request in the device identifier database; A first storage unit, used to return the global device identification to the vehicle end, and store the global device identification, the device channel keyword and the original device identification in the device identification database in correspondence; The device also includes: A registration unit is used to register device channel keywords for each vehicle end; An allocation unit, for allocating a device channel identifier to each vehicle terminal according to a device channel keyword of each vehicle terminal; A second storage unit is used to store the device channel keyword of each vehicle end and the device channel identifier in the device identifier database in correspondence; The device channel keyword refers to keyword information used to distinguish different device manufacturers, and the device channel identifier is identifier information used to distinguish different device manufacturers; The device also includes: A third determining unit is used to determine whether the device channel keyword exists in the device identification database; if so, executing the step of determining whether there is a global device identification corresponding to the network request in the device identification database according to the network request; if not, returning an error prompt message; The generating unit is specifically used for: According to the device channel keyword, determining a corresponding device channel identifier in the device identifier database; Get the current server system time; Generate a global device identifier corresponding to the network request according to the device channel identifier and the current server system time; Processing the original device identifier based on a preset digest algorithm to obtain a random character string; A global device identifier corresponding to the network request is generated according to the device channel identifier, the current server system time, and the random character string.
5. A vehicle-mounted equipment identification acquisition device, in, The device is applied to a vehicle end, and comprises: A second determination unit is used to determine whether the global device identification of the vehicle-mounted device can be obtained locally from the vehicle end; A sending unit, configured to send a network request to a server when the global device identifier of the vehicle-mounted device cannot be obtained locally from the vehicle end, wherein the network request is used to obtain the device identifier of the vehicle end, and the network request includes a device channel keyword and an original device identifier; A receiving unit, used for receiving the global device identification of the vehicle-mounted device returned by the server and storing it locally on the vehicle side; The global device identification of the vehicle-mounted device is obtained based on the device described in claim 4.
6. An electronic device, include: processor; as well as A memory arranged to store computer executable instructions, which, when executed, cause the processor to perform any of the methods of claims 1 to 2, or to perform the method of claim 3.
