Device registration method, device, electronic device and storage medium
By detecting equipment information at the terminal in the health cabin and generating a serial number, the equipment registration is automatically completed, and the problem of inconvenient entry of equipment information in the prior art is solved, and the efficiency and reliability of data upload are improved.
Patent Information
- Application Number
- CN202180001381.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-05-27
- Publication Date
- 2025-04-08
- Estimated Expiration
- 2041-05-27
AI Technical Summary
In the prior art, the detection equipment in the health cabin needs to import or enter device information on the backend server, resulting in inconvenient data upload and easily lead to data loss or delayed reception.
By detecting the device information of the access device in the work room, generating the device serial number and sending it to the server, so that the server can complete the device registration according to the serial number.
Automatic registration of equipment is realized, errors and delays of manual entry are avoided, and the efficiency and reliability of data upload is improved, and the normal processing and storage of equipment data is ensured.
Smart Images

Figure CN115735368B_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the technical field of device registration, and in particular to a device registration method, apparatus, electronic device and storage medium. Background Art
[0002] With the advancement of science and technology and the continuous enhancement of people's health awareness, there are more and more testing platforms such as health huts. There is a workstation in the health hut, which is connected to the testing equipment for detecting human health information. The health data detected in the health hut needs to be uploaded to the backend server to save and process the data. In the related technology, it is necessary to import or enter the device information in the health hut in advance on the backend server so that the server can receive, process and save the data generated by these devices, which is very inconvenient and can easily cause the data to be unable to be processed normally or even cause data loss. Summary of the invention
[0003] The present disclosure provides a device registration method, apparatus, electronic device and storage medium.
[0004] According to some embodiments of the present disclosure, a device registration method is provided, which is applied to a terminal in a studio, including:
[0005] Detect device information of a device accessing a terminal;
[0006] generating a serial number of the device according to the device information;
[0007] The serial number is sent to a server, so that the server completes registration of the device according to the serial number.
[0008] In some embodiments, the detecting device information of the device accessing the terminal includes:
[0009] The device of the access terminal is detected by a software development kit arranged in the terminal to obtain device information of the device.
[0010] In some embodiments, the terminal pre-stores a configuration file, the configuration file includes device information of each device to be connected, the device information includes a device model and at least one device attribute information;
[0011] The device information of the device accessing the terminal is detected, including:
[0012] Detecting a device of the access terminal by using a software development kit arranged in the terminal to obtain a device model of the device;
[0013] According to the device model, at least one corresponding device attribute information is obtained from the configuration file.
[0014] In some embodiments, the device attribute information includes at least one of: type identification, device type, device name, manufacturer, and serial port address.
[0015] In some embodiments, the terminal pre-stores a configuration file, the configuration file including device information and a serial port scanning command for each device to be connected;
[0016] The device information of the device accessing the terminal is detected, including:
[0017] Matching the device information in the configuration file with the device to obtain a matched device and the device information of the device;
[0018] Confirm whether the matched device is connected through the serial port scanning command in the configuration file;
[0019] When it is confirmed that the matched device has been connected, the device information of the matched device is confirmed as the device information of the device accessing the terminal.
[0020] In some embodiments, the device information includes at least one of: device type, type identification, device model, name, manufacturer, and serial port address.
[0021] In some embodiments, it also includes:
[0022] Add, reduce or update device information of at least one device to be connected in the configuration file.
[0023] In some embodiments, generating a serial number of the device according to the device information includes:
[0024] Acquire at least one item of information from the device information;
[0025] A serial number of the device is generated according to the at least one item of information and a preset format of the serial number.
[0026] In one embodiment, it further includes:
[0027] A terminal identification is obtained, and a serial number of the device is generated according to the terminal identification, the at least one item of information and a preset format of the serial number.
[0028] In one embodiment, it further includes:
[0029] The studio identifier and the terminal identifier are obtained, and the serial number of the device is generated according to the studio identifier, the terminal identifier, the at least one item of information and a preset format of the serial number.
[0030] In some embodiments, the serial number includes a terminal identification and a device model.
[0031] In some embodiments, it also includes:
[0032] When the serial number is sent to the server, at least one of the studio identifier, device type, type identifier, name, manufacturer, and serial port address is sent to the server so that the server completes registration of the device.
[0033] In some embodiments, after sending the serial number to the server so that the server completes registration of the device according to the serial number, the method further includes:
[0034] The data generated by the device that has completed registration is received, and the data is sent to the server so that the server processes and / or stores the data.
[0035] In some embodiments, the terminal is a terminal arranged in a health hut, and the studio logo is a logo of the health hut.
[0036] According to some embodiments of the present disclosure, a device registration method is provided, including:
[0037] Receiving a serial number of a device sent by a terminal, wherein the serial number is generated by the terminal and includes a studio identifier, a terminal identifier, and device information, wherein the device information includes a type identifier and a device model;
[0038] The device is registered according to the serial number of the device.
[0039] In some embodiments, it also includes:
[0040] Receive at least one of the studio identification, device type, type identification, name, manufacturer, and serial port address sent by the terminal.
[0041] In some embodiments, registering the device according to the serial number of the device includes:
[0042] Verifying the legitimacy of the studio according to the studio identifier, and verifying the legitimacy of the device according to the device information;
[0043] In response to the studio being legal and the device being legal, the device is bound to the studio and marked as a registered device.
[0044] According to some embodiments of the present disclosure, a device registration apparatus is provided, including:
[0045] A detection module, used to detect device information of a device accessing the terminal;
[0046] A generating module, used to generate a serial number of the device according to the device information;
[0047] The first registration module is used to send the serial number to the server, so that the server completes registration of the device according to the serial number.
[0048] According to some embodiments of the present disclosure, a device registration apparatus is provided, including:
[0049] A receiving module, configured to receive a serial number of a device sent by a terminal, wherein the serial number is generated by the terminal and includes a studio identifier, a terminal identifier, and device information, wherein the device information includes a type identifier and a device model;
[0050] The second registration module is used to complete the registration of the device according to the serial number of the device.
[0051] According to some embodiments of the present disclosure, an electronic device is provided, the device comprising a memory and a processor, the memory being used to store computer instructions executable on the processor, the processor being used to register the device based on the methods described in some embodiments of the present disclosure when executing the computer instructions.
[0052] According to some embodiments of the present disclosure, a computer-readable storage medium is provided, on which a computer program is stored. When the program is executed by a processor, the methods described in some embodiments of the present disclosure are implemented.
[0053] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS
[0054] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and, together with the description, serve to explain the principles of the present disclosure.
[0055] Figure 1 is a flow chart of a device registration method shown in some embodiments of the present disclosure;
[0056] Figure 2 is a flow chart of a device registration method shown in some other embodiments of the present disclosure;
[0057] Figure 3 is a schematic diagram of the structure of a device registration apparatus shown in some embodiments of the present disclosure;
[0058] Figure 4 is a schematic diagram of the structure of a device registration apparatus shown in other embodiments of the present disclosure;
[0059] Figure 5 It is a schematic diagram of the structure of an electronic device shown in some embodiments of the present disclosure. DETAILED DESCRIPTION
[0060] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, the same numbers in different drawings represent the same or similar elements unless otherwise indicated. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present disclosure. Instead, they are merely examples of devices and methods consistent with some aspects of the present disclosure as detailed in the appended claims.
[0061] The terms used in this disclosure are for the purpose of describing specific embodiments only and are not intended to limit the disclosure. The singular forms of "a", "said" and "the" used in this disclosure and the appended claims are also intended to include plural forms unless the context clearly indicates otherwise. It should also be understood that the term "and / or" used herein refers to and includes any or all possible combinations of one or more associated listed items.
[0062] It should be understood that although the terms first, second, third, etc. may be used in the present disclosure to describe various information, such information should not be limited to these terms. These terms are only used to distinguish the same type of information from each other. For example, without departing from the scope of the present disclosure, the first information may also be referred to as the second information, and similarly, the second information may also be referred to as the first information. Depending on the context, the word "if" as used herein may be interpreted as "at the time of" or "when" or "in response to determining".
[0063] The detection equipment cannot connect to the network. The management of these devices is usually first imported through electronic forms or scanned into the backend server. Only after it becomes a legal and valid device in the backend server can the data be sent to the backend server normally through other media when the device is used. If the device is not entered into the backend server, the data generated by the device will not be received, processed and saved in the backend server. Once it is not entered or imported into the backend server, the data cannot be uploaded and processed normally, resulting in data loss or delayed reception.
[0064] The process of maintaining equipment information also requires obtaining the serial number of the equipment itself and the corresponding organization information of the equipment, etc., and then importing it through a spreadsheet or scanning the code to enter it into the backend server. Since this process is a manual operation, it is time-consuming, labor-intensive and prone to errors. When replacing equipment, it is also necessary to maintain the equipment information on the server first, and then replace the equipment in the cabin to ensure that the equipment data is uploaded to the background normally. The plug-and-play effect cannot be achieved. At the same time, when replacing equipment here, the old equipment cannot be deleted, causing management confusion.
[0065] Based on this, some embodiments of the present disclosure provide a device registration method, please refer to Figure 1 , which shows the process of the device registration method, including steps S101 to S103.
[0066] Among them, the device registration method can be used to register the detection device in the health detection platform such as the health hut to the background server. That is to make the detection device a legal device recorded in the background server, so that the detection device can normally send health data to the background server. The background server will receive, process and save the health data sent by the legal device. Therefore, this method can be executed by the terminal in the studio such as the health hut.
[0067] In the application scenario of the health hut, at least one workstation and at least one type of detection equipment are set in the hut. Each type of detection equipment can include multiple devices. Users can log in to the workstation and enter user information. Users can select the equipment they need to use through the workstation. The workstation provides detection guidance to users through user interaction interfaces and other forms. Users can move to the corresponding detection equipment location according to the detection guidance provided by the workstation and perform corresponding tests. After the user performs the test through the detection equipment, the corresponding test results will be sent to the workstation and displayed through the workstation. Health huts can be set up in communities and other places. Residents of the community can go to the hut to use equipment for health tests, which is convenient for residents to manage their own health.
[0068] In step S101, device information of a device connected to the terminal is detected.
[0069] The terminal may be a terminal in a studio such as a health hut. In some embodiments, the studio is the above-mentioned health hut, and the terminal is a workstation arranged in the health hut. The studio may also be other spaces such as an exhibition hall, which is not limited here.
[0070] The terminal in the studio has a large number of serial interfaces and / or Universal Serial Bus (USB) interfaces, and detection equipment and other devices can be connected to the terminal through these serial interfaces and / or USB interfaces.
[0071] Among them, the device can be a medical detection device, which is a device with the function of detecting human health indicators. It can be for home use or for medical use, and there is no limitation here. The device information can include at least one of the device type, type identifier, device model, name, manufacturer, and serial port address. The device type is divided according to the category of the detection device. For example, the device type can be a blood pressure monitor, a height and weight monitor, etc. The type identifier is an identifier of the device type, such as a number corresponding to the above device type, etc. For example, the type identifier of the blood pressure monitor is 1, and the type identifier of the height and weight monitor is 2. The specific type identifier can be pre-set, and there is no limitation here.
[0072] There are many ways for a terminal to detect the device information of an accessed device. The terminal can actively read the device information of the device through an accessed serial interface or USB interface, or the accessed device can report the device information through a serial interface or USB interface. In a feasible implementation, the device of the accessed terminal can be detected by a software development kit (SDK) set in the terminal to obtain the device information of the device. In a feasible implementation, the device of the accessed terminal can be detected by a configuration file set in the terminal to obtain the device information of the device.
[0073] In step S102, a serial number of the device is generated according to the device information.
[0074] Among them, the serial number of the device is the unique identifier of the device in the background server, which may include one or more aspects of the device to distinguish it from other devices. The serial number may have a specific format so that the serial numbers of different devices are easy to compare and the server can parse the serial number to locate the device. The format of the serial number may be generated by default by the server or terminal, or it may be pre-set by the user. For example, the serial number may include a terminal identifier and a device model, see "ws-m0", where "ws" is the terminal identifier and "m0" is the device model. For another example, the serial number may include a studio identifier, a terminal identifier, a type identifier and a device model, see the serial number "ws-mtx-m0-3", where "ws" is the terminal identifier, "mtx" is the type identifier of the device type, "m0" is the device model, and "3" is the studio identifier. Among them, the studio identifier may be an identifier of the health hut, such as a number or name; the terminal identifier may also be a number or name.
[0075] The serial number of the device may be generated according to the device information in the following manner: first, at least one item of information is acquired from the device information; next, the serial number of the device is generated according to the at least one item of information and a preset format of the serial number.
[0076] When obtaining at least one item of information contained in the serial number from the device information, the information required for the serial number can be read in advance and obtained in a targeted manner. For example, when the serial number includes a type identifier and a device model, the type identifier and the device model can be obtained from the device information. When generating the serial number of the device, the at least one item of information obtained from the device information can be arranged in a preset order, connected using a preset connector, and then necessary annotation characters can be added.
[0077] In addition, when the serial number also includes a terminal identifier, the terminal identifier can also be obtained, and the serial number of the device is generated according to the terminal identifier, the at least one information and the preset format of the serial number. For example, the terminal identifier and the device model are used to generate the serial number according to the preset format. When the serial number also includes a studio identifier and a terminal identifier, the studio identifier and the terminal identifier can also be obtained, and the serial number of the device is generated according to the preset format of the studio identifier, the terminal identifier, the at least one information and the preset format of the serial number. The studio identifier can be a name and / or a number, and the terminal identifier can also be a name and / or a number. When the serial number includes a terminal identifier, or includes a studio identifier and a terminal identifier, it is also necessary to arrange the terminal identifier and at least one information obtained from the device information in a preset order, and connect them using a preset connector, and then add necessary annotation characters, or arrange the studio identifier, the terminal identifier and at least one information obtained from the device information in a preset order, and connect them using a preset connector, and then add necessary annotation characters.
[0078] In some embodiments, when there are multiple different studios, different studios can be set in different areas, such as in different cities, and unique studio identifiers can be set for different studios, and the studio identifier can include the studio name and / or the studio number ID. The studio identifier (such as the health hut identifier) is obtained based on the information of the logged-in user when logging into the terminal (such as a workstation), and can include the studio name, the studio number ID (such as the name of the health hut and the unique identification number ID of the health hut). In some embodiments, the purpose of using the health hut information and the device information as input parameters is to associate the device with the hut, and the device in the input parameter belongs to the hut in the input parameter.
[0079] In step S103, the serial number is sent to a server, so that the server completes registration of the device according to the serial number.
[0080] For example, after receiving the serial number, the server marks the device as a registered device according to the serial number.
[0081] For example, when the serial number includes a studio ID, after receiving the serial number, the server can also verify the legitimacy of the studio based on the studio ID, and verify the legitimacy of the device based on the device information; and in response to the studio and the device being legal, bind the device to the studio and mark the device as a registered device.
[0082] In addition, after the server completes the registration of the device, the detection data of the device can be reported normally. That is, the terminal can receive the data generated by the device that has completed the registration, and send the data to the server so that the server processes and / or saves the data. When the server registers the device, it can preset a dedicated storage area for the device, and when storing the detection data uploaded by the device, it can be stored in the corresponding storage area. When the terminal reports the data, it can use the serial number of the device to identify the data so that the server can determine which device the data belongs to.
[0083] In the embodiment of the present disclosure, the terminal detects the device information of the connected device, generates the serial number of the device according to the device information, and finally sends the serial number to the server so that the server completes the registration of the device according to the serial number. It avoids importing or entering device information on the background server, saves labor costs, improves registration efficiency, enables the device to be accessed and used at any time, and avoids the situation where the data of the connected device cannot be uploaded; and the automatically generated serial number does not require the serial number of the device itself, avoiding the dirty data problem caused by the exposure of the device serial number; in addition, it can also realize the free deployment and replacement of equipment between different studios, without the need to add and change the corresponding equipment attributes on the background server, and at the same time, it will not generate dirty data of the deployment equipment history record of the faulty equipment.
[0084] In some embodiments of the present disclosure, a configuration file may be pre-stored in the terminal, the configuration file including device information of each device to be connected, the device information including a device model and at least one device attribute information, wherein the device attribute information includes at least one of a type identifier, a device type, a device name, a manufacturer, and a serial port address.
[0085] Based on this, the device information of the device connected to the terminal can be detected in the following manner: first, the device connected to the terminal is detected by a software development kit set in the terminal to obtain the device model of the device; next, according to the device model, at least one corresponding device attribute information is obtained from the configuration file, for example, the device model of the device is found in the configuration file, and the device attribute information of the device corresponding to the device model can also be obtained.
[0086] Since the device information of the device is pre-written in the configuration file, and the device model is the unique identifier of the device information (because the terminal will not connect to multiple devices of the same model), all the device information can be determined by obtaining the device model, which significantly improves efficiency and accuracy. The configuration file and the connected devices are unified because they are determined according to the working nature of the terminal. For example, the terminal needs to have the functions of measuring blood pressure, height and weight, and body fat. Therefore, after selecting three specific devices, write the device information into the configuration file, and then connect the three devices to the terminal.
[0087] In some embodiments of the present disclosure, the device information of the device accessing the terminal may also be detected in the following manner:
[0088] A configuration file is pre-stored in the terminal, the configuration file including device information and serial port scanning commands of each device to be connected;
[0089] Matching the device information in the configuration file with the device to obtain the matched device and the device information of the device;
[0090] Use the serial port scanning command in the configuration file to confirm whether the matched device is connected;
[0091] When it is confirmed that the matched device is connected, the device information of the matched device is confirmed as the device information of the device accessing the terminal.
[0092] For example, when a device is connected to a terminal, the terminal matches at least one device information pre-stored in the configuration file with the connected device, for example, the device model, device type, manufacturer, etc. are matched with the device one by one. If they can be matched, the device information of the device is obtained. Next, it is necessary to confirm whether the device is in a connected state. For example, the serial port scanning command includes a send command and a standard receive command. After the device information is obtained, the send command is sent to the device. The device will return a receive command to the terminal. The terminal matches the received command with the standard receive command. If they match, it is confirmed that the device is connected. At this time, the matched device information can be used as the device information of the device detected to be connected to the terminal.
[0093] In addition, when it is necessary to replace the device connected to the terminal, the device information of at least one device to be connected in the configuration file can be increased, reduced or updated according to the specific information of the replacement, and then the corresponding device can be connected, removed or replaced. When a new device needs to be added, the device information of the selected device can be added to the configuration file first, and then the device can be connected; when a device needs to be disassembled, the device information of the device in the configuration file can be reduced before disassembly. This step does not affect the removal of the device, but it can reduce the memory of the configuration file; when a device needs to be replaced, the device information of the original device can be updated to the device information of the new device, and then the old device can be removed and the new device can be connected. By operating the configuration file in advance, the device can be replaced at any time, plug and play; and the device information can be updated only locally in the terminal, and the device information is updated silently in the background, which reduces the information asymmetry and other problems caused by direct modification from the server.
[0094] In some embodiments of the present disclosure, while sending the serial number to the server, at least one of the studio identifier, device type, type identifier, name, manufacturer, and serial port address may also be sent to the server so that the server completes registration of the device.
[0095] By directly sending the studio ID to the server, the server can determine the legitimacy of the studio by the studio ID before parsing the serial number, thus improving the registration efficiency. When the studio is illegal, there is no need to parse the serial number. By sending device information other than the serial number (i.e., at least one of the device type, type ID, name, manufacturer, and serial port address) to the server, the registered device information can be further increased, making the registration information richer, and the device information can also be displayed.
[0096] For example, the information sent by the terminal to the server is {"sn":"ws-mtx-m0-3","deviceName":"Non-invasive blood tester","model":"m0","vendor":"BOE""sceneId":"3"}, where sn is the serial number automatically generated by the terminal, deviceName is the device name, model is the device model, vendor is the device manufacturer, and sceneId is the studio number.
[0097] Some embodiments of the present disclosure provide a device registration method, please refer to Figure 2 , which shows the process of the device registration method, including step S201 to step S202.
[0098] The device registration method is applied to a server, that is, a background server that has a network connection with a terminal in a studio and can communicate.
[0099] In step S201, a serial number of a device sent by the terminal is received, wherein the serial number is generated by the terminal and includes a terminal identifier and device information, and the device information includes a device model.
[0100] The process of generating the serial number by the terminal has been described in detail in other embodiments, and will not be repeated here. It should be noted that when the terminal sends the serial number, it can also send at least one of the studio identification, device type, type identification, name, manufacturer, and serial port address, and the server receives this information at the same time.
[0101] In step S202, the device is registered according to the serial number of the device.
[0102] The legitimacy of the studio may be verified based on the studio identifier, and the legitimacy of the device may be verified based on the device information. Then, in response to the studio and the device being legitimate, the device may be bound to the studio and marked as a registered device.
[0103] A list of legal studios can be pre-stored in the server. When verifying the legitimacy of a studio, the studio identifier can be compared with each identifier in the list. If the studio identifier exists in the list, the studio is determined to be legal. If not, the studio is determined to be illegal. A list of legal device types can be pre-stored in the server. When verifying the legitimacy of a device, the device type can be compared with each type in the list. If the device type exists in the list, the device is determined to be legal. If not, the device is determined to be illegal.
[0104] In addition, before binding the device to the studio and marking the device as a registered device, it is also possible to determine whether the serial number of the device is the serial number of a registered device. If the serial number of the device is the serial number of a registered device, the device information of the registered device is updated. If the serial number of the device is the serial number of a registered device, the device is bound to the studio and marked as a registered device. The above steps can avoid duplicate registration, which causes errors and confusion in device information.
[0105] In this embodiment, only when the device in the studio is actually connected, will the device information be obtained, the serial number be generated, and the reverse registration be performed, and the device can be installed in the studio and used at any time without the need for background preprocessing operations and processes. The traditional background entry operation is changed to an active registration operation when the on-site device is connected, which solves the error rate of human operation, shields the blocking points of the initialization and use process, improves the fluency of the entire process, and at the same time improves the security of device information.
[0106] According to some embodiments of the present disclosure, a device registration apparatus is provided, which is applied to a terminal in a studio. Figure 3 , which shows the structure of the device, including:
[0107] A detection module 301, configured to detect device information of a device connected to the terminal;
[0108] A generating module 302, configured to generate a serial number of the device according to the device information;
[0109] The first registration module 303 is used to send the serial number to the server, so that the server completes registration of the device according to the serial number.
[0110] According to some embodiments of the present disclosure, a device registration apparatus is provided, which is applied to a server. Figure 4 , which shows the structure of the device, including:
[0111] The receiving module 401 is used to receive the serial number of the device sent by the terminal, wherein the serial number is generated by the terminal and includes a studio identifier, a terminal identifier and device information, and the device information includes a type identifier and a device model;
[0112] The second registration module 402 is used to complete the registration of the device according to the serial number of the device.
[0113] Regarding the device in the above embodiment, the specific manner in which each module and the network perform operations has been described in detail in the embodiment of the method above, and will not be elaborated here.
[0114] Please refer to the attached Figure 5 Some embodiments of the present disclosure provide an electronic device, which includes a memory and a processor, wherein the memory is used to store computer instructions that can be executed on the processor, and the processor is used to register the device based on the above method when executing the computer instructions.
[0115] Some embodiments of the present disclosure provide a computer-readable storage medium having a computer program stored thereon, and the program implements the above method when executed by a processor.
[0116] The various component embodiments of the present disclosure may be implemented in hardware, or in a software module running on one or more processors, or in a combination thereof.
[0117] It should be understood that the various steps in the present disclosure are not necessarily performed in sequence. Unless otherwise specified herein, the execution of these steps is not strictly limited in order, and they can be performed in other orders. Moreover, at least a portion of the steps in the flowchart of the accompanying drawings may include multiple sub-steps or multiple stages, and these sub-steps or stages are not necessarily performed at the same time, but can be performed at different times, and their execution order is not necessarily performed in sequence, but can be performed in turn or alternately with other steps or at least a portion of the sub-steps or stages of other steps.
[0118] In the present disclosure, the terms "first" and "second" are used for descriptive purposes only and should not be understood as indicating or implying relative importance. The term "plurality" refers to two or more, unless otherwise clearly defined.
[0119] Those skilled in the art will readily appreciate other embodiments of the present disclosure after considering the specification and practicing the disclosure disclosed herein. The present disclosure is intended to cover any variations, uses, or adaptations of the present disclosure that follow the general principles of the present disclosure and include common knowledge or customary techniques in the art that are not disclosed in the present disclosure. The description and examples are to be considered exemplary only, and the true scope and spirit of the present disclosure are indicated by the following claims.
[0120] It should be understood that the present disclosure is not limited to the exact structures that have been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.
Claims
1. A device registration method, characterized in that: include: Detect device information of a device accessing a terminal; generating a serial number of the device according to the device information; Sending the serial number to a server so that the server completes registration of the device according to the serial number; The terminal stores a configuration file in advance, wherein the configuration file includes device information and a serial port scanning command for each device to be connected; The device information of the device accessing the terminal is detected, including: Matching the device information in the configuration file with the device to obtain a matched device and the device information of the device; Confirm whether the matched device is connected through the serial port scanning command in the configuration file; When it is confirmed that the matched device has been connected, the device information of the matched device is confirmed as the device information of the device accessing the terminal.
2. The device registration method according to claim 1, characterized in that: The device information of the device accessing the terminal is detected, including: The device of the access terminal is detected by a software development kit arranged in the terminal to obtain device information of the device.
3. The device registration method according to claim 2, characterized in that: The terminal pre-stores a configuration file, the configuration file including device information of each device to be connected, the device information including a device model and at least one device attribute information; The device information of the device accessing the terminal is detected, including: Detecting a device of the access terminal by using a software development kit arranged in the terminal to obtain a device model of the device; According to the device model, at least one corresponding device attribute information is obtained from the configuration file.
4. The device registration method according to claim 3, characterized in that: The device attribute information includes at least one of: type identification, device type, device name, manufacturer, and serial port address.
5. The device registration method according to claim 1, characterized in that: The device information includes: at least one of device type, type identification, device model, name, manufacturer, and serial port address.
6. The device registration method according to any one of claims 3 to 4, characterized in that: Also includes: Add, reduce or update device information of at least one device to be connected in the configuration file.
7. The device registration method according to any one of claims 1 to 6, characterized in that: Generating a serial number of the device according to the device information includes: Acquire at least one item of information from the device information; A serial number of the device is generated according to the at least one item of information and a preset format of the serial number.
8. The device registration method according to claim 7, characterized in that: Also includes: A terminal identification is obtained, and a serial number of the device is generated according to the terminal identification, the at least one item of information and a preset format of the serial number.
9. The device registration method according to claim 7, characterized in that: Also includes: The studio identifier and the terminal identifier are obtained, and the serial number of the device is generated according to the studio identifier, the terminal identifier, the at least one item of information and a preset format of the serial number.
10. The device registration method according to any one of claims 1 to 9, characterized in that: The serial number includes a terminal identification and a device model.
11. The device registration method according to claim 1, characterized in that: Also includes: When the serial number is sent to the server, at least one of the studio identification, device type, type identification, name, manufacturer, and serial port address is sent to the server so that the server completes registration of the device.
12. The device registration method according to claim 1, characterized in that: After sending the serial number to the server so that the server completes registration of the device according to the serial number, the method further includes: The data generated by the device that has completed registration is received, and the data is sent to the server so that the server processes and / or stores the data.
13. The device registration method according to any one of claims 1 to 12, characterized in that: The terminal is a terminal arranged in a health hut, and the studio logo is a logo of the health hut.
14. A device registration apparatus, characterized in that: include: A detection module, used to detect device information of a device accessing the terminal; A generating module, used to generate a serial number of the device according to the device information; A first registration module, used for sending the serial number to a server, so that the server completes registration of the device according to the serial number; The terminal stores a configuration file in advance, wherein the configuration file includes device information and a serial port scanning command for each device to be connected; The detection module is used to match the device information in the configuration file with the device to obtain the matched device and the device information of the device; Confirm whether the matched device is connected through the serial port scanning command in the configuration file; When it is confirmed that the matched device has been connected, the device information of the matched device is confirmed as the device information of the device accessing the terminal.
15. An electronic device, characterized in that: The device comprises a memory and a processor, wherein the memory is used to store computer instructions executable on the processor, and the processor is used to perform device registration based on the method according to any one of claims 1 to 13 when executing the computer instructions.
16. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the method according to any one of claims 1 to 13 is implemented.
Citation Information
Patent Citations
Method and device for automatically registering equipment serial number, computer device and storage medium
CN111193817A