Java-based local discovery server running method, system and device
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- HUIZHIAN INFORMATION TECH CO LTD
- Filing Date
- 2022-12-28
- Publication Date
- 2026-04-10
AI Technical Summary
[0002]随着服务器与工业、生活等领域的多方面合作和多维度发展,对服务器实现需求的要求也越来越高;本地发现服务器(LDS),设备可以在LDS上进行不停地注册,然后中间件(client)可以发现在LDS上注册的设备;然而,目前官方提供的只有windows平台上的lds,但是却没有能跑在linux上java实现的lds,为日常的使用带来了许多不便,缺少替代解决方案
[0037]本发明提供了一种基于java的本地发现服务器运行方法、系统、设备及介质,包括:获取本地发现服务器的服务器数据;根据所述服务器数据为所述本地发现服务器配置协议,并根据所述协议进行通信加密;基于所述通信加密和预设的服务器库进行服务器检索,得到目标服务器,并进行注册处理。本发明基于java对本地发现服务器进行配置,解决了官方LDS无法运行在linux上的问题,给中间件提供了LDS相应功能,提高了服务器的适用性和服务器运行效率;并对服务器加密配置提供了支持,提高了服务器协议准确性和通信安全性。
Smart Images

Figure CN116827793B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The application relates to the technical field of servers, in particular to a java-based local discovery server running method, system and device. BACKGROUND
[0002] With the cooperation and multidimensional development of servers in the fields of industry and life, the requirements for server implementation are becoming higher and higher; a local discovery server (LDS) is used for the registration of devices, and a middleware (client) can discover the registered devices on the LDS; however, the official currently provides only an LDS on a windows platform, and there is no LDS implemented by java and running on a linux, which brings many inconveniences to daily use and lacks alternative solutions. SUMMARY
[0003] The application provides a java-based local discovery server running method, which comprises the following steps:
[0004] obtaining server data of a local discovery server;
[0005] configuring a protocol for the local discovery server according to the server data, and performing communication encryption according to the protocol;
[0006] performing server retrieval based on the communication encryption and a preset server library, obtaining a target server, and performing registration processing.
[0007] Preferably, the step of configuring the protocol for the local discovery server according to the server data comprises the following steps:
[0008] performing deployment configuration according to the server data to obtain a configuration code readable by java;
[0009] matching the configuration code according to a preset configuration table to obtain a server configuration package and a corresponding configuration strategy;
[0010] deploying the server configuration package according to the configuration strategy to obtain the protocol configured by the local discovery server.
[0011] Preferably, the step of performing communication encryption according to the protocol comprises the following steps:
[0012] configuring a server private key for the local discovery server according to the protocol;
[0013] generating a certificate signing request based on the server private key and server data, and converting the certificate signing request into a server signature certificate;
[0014] performing communication encryption according to the server private key and the server signature certificate.
[0015] Preferably, the server data comprises: server address, server domain name, server resource and authentication parameter.
[0016] Preferably, the registration processing comprises: target device registration of local discovery server based on milo library, and searching registered device to obtain registered device information.
[0017] The application further provides a java-based local discovery server running system, comprising:
[0018] a collection module for obtaining server data of the local discovery server;
[0019] a communication module for configuring protocol for the local discovery server according to the server data, and performing communication encryption according to the protocol;
[0020] a running module for performing server searching based on the communication encryption and preset server library to obtain target server, and performing registration processing.
[0021] Preferably, the communication module comprises:
[0022] a protocol submodule and an encryption submodule;
[0023] The protocol submodule comprises: an encoding unit, a configuration unit and a deployment unit;
[0024] The encoding unit is configured to obtain configuration code readable based on java according to deployment configuration based on the server data;
[0025] The configuration unit is configured to match the configuration code according to preset configuration table to obtain server configuration package and corresponding configuration strategy;
[0026] The deployment unit is configured to deploy the server configuration package according to the configuration strategy to obtain protocol configured for the local discovery server.
[0027] Preferably, the encryption submodule comprises:
[0028] a private key unit configured to configure server private key for the local discovery server according to the protocol;
[0029] a signature unit configured to generate certificate signature request based on the server private key and server data, and convert into server signature certificate;
[0030] an encryption unit configured to perform communication encryption according to the server private key and server signature certificate.
[0031] Preferably, the server data in the signature unit comprises: server address, server domain name, server resource and authentication parameter.
[0032] Preferably, the registration processing in the running module is used for target device registration of the local discovery server based on the milo library, and the registered device is searched to obtain registered device information.
[0033] The application further provides a computer device, comprising: one or more processors; a memory for storing one or more programs;
[0034] When the one or more programs are executed by the one or more processors, a java-based local discovery server running method is realized.
[0035] The application further provides a computer readable storage medium, which has a computer program stored thereon, and the computer program is executed to realize a java-based local discovery server running method.
[0036] Compared with the closest prior art, the application has the beneficial effects as follows:
[0037] The application provides a java-based local discovery server running method, system, device and medium, comprising: obtaining server data of a local discovery server; configuring a protocol for the local discovery server according to the server data, and performing communication encryption according to the protocol; performing server search based on the communication encryption and a preset server library to obtain a target server, and performing registration processing.
[0038] Other features and advantages of the application will be set forth in the following description, and in part will become apparent to those skilled in the art upon examination of the following or can be learned by practice of the application. The objects and other advantages of the application can be realized and attained by the structure particularly pointed out in the written description and claims hereof as well as the appended drawings.
[0039] The technical solutions of the application will be further described in detail below with the drawings and examples. BRIEF DESCRIPTION OF DRAWINGS
[0040] The accompanying drawings are included to provide a further understanding of the application, and constitute a part of the specification, illustrate the application, and are used to explain the application together with the embodiments of the application, and do not constitute a limitation on the application. In the drawings:
[0041] Figure 1 A method flow chart of a java-based local discovery server running method in an embodiment of the present application is shown in Figure 1.
[0042] Figure 2 A function chart of a java-based local discovery server running system in an embodiment of the present application is shown in Figure 2. DETAILED DESCRIPTION
[0043] The preferred embodiments of the present application are described below in conjunction with the accompanying drawings, in which it is understood that the preferred embodiments described below are merely used to illustrate and explain the present application, and are not used to limit the present application.
[0044] Embodiment 1
[0045] An embodiment of the present application provides a java-based local discovery server running method, as shown in Figure 1, which comprises the following steps: Figure 1
[0046] Step 1: Obtain server data of a local discovery server;
[0047] Step 2: Configure a protocol for the local discovery server according to the server data, and perform communication encryption according to the protocol;
[0048] Step 3: Perform server retrieval based on the communication encryption and a preset server library, obtain a target server, and perform registration processing.
[0049] Specifically, Step 2 comprises the following steps:
[0050] Specifically, the step of configuring a protocol for the local discovery server according to the server data comprises the following steps:
[0051] Perform deployment configuration according to the server data to obtain a java-readable configuration code;
[0052] Match the configuration code according to a preset configuration table to obtain a server configuration package and a corresponding configuration strategy;
[0053] Deploy the server configuration package according to the configuration strategy to obtain a protocol configured for the local discovery server.
[0054] Specifically, the step of performing communication encryption according to the protocol comprises the following steps:
[0055] Configure a server private key for the local discovery server according to the protocol;
[0056] Generate a certificate signing request based on the server private key and the server data, and convert it into a server signature certificate;
[0057] Communication encryption is performed according to the server private key and the server signature certificate.
[0058] Specifically, the server data includes a server address, a server domain name, server resources and authentication parameters.
[0059] Specifically, step 3 includes:
[0060] Specifically, the registration processing includes target device registration of local discovery server based on a milo library, and searching for registered devices to obtain registered device information.
[0061] The application configures the local discovery server based on java, solves the problem that the official LDS cannot run on linux, provides the LDS corresponding function for middleware, and improves the server applicability and server running efficiency.
[0062] Embodiment 2:
[0063] The embodiment of the application provides a java-based local discovery server running system, as shown in the figure, which includes: Figure 2
[0064] The acquisition module is used for acquiring server data of the local discovery server.
[0065] The communication module is used for configuring a protocol for the local discovery server according to the server data, and performing communication encryption according to the protocol.
[0066] The running module is used for performing server searching based on the communication encryption and a preset server library, obtaining a target server, and performing registration processing.
[0067] Specifically, the communication module includes:
[0068] A protocol submodule and an encryption submodule.
[0069] Specifically, the protocol submodule includes an encoding unit, a configuration unit and a deployment unit.
[0070] The encoding unit is used for deployment configuration according to the server data to obtain a configuration code readable based on java.
[0071] The configuration unit is used for matching the configuration code according to a preset configuration table to obtain a server configuration package and a corresponding configuration strategy.
[0072] The deployment unit is used for deploying the server configuration package according to the configuration strategy to obtain a protocol configured by the local discovery server.
[0073] Specifically, the encryption submodule includes:
[0074] a private key unit configured to configure a server private key for the local discovery server according to the protocol;
[0075] a signature unit configured to generate a certificate signing request based on the server private key and server data, and convert into a server signed certificate;
[0076] an encryption unit configured to perform communication encryption according to the server private key and the server signed certificate.
[0077] Specifically, the server data in the signature unit includes a server address, a server domain name, a server resource and an authentication parameter.
[0078] Specifically, the registration processing in the running module is configured to perform target device registration of the local discovery server based on a milo library, and search for the registered device to obtain registered device information.
[0079] The application provides support for server encryption configuration through the acquisition module, the communication module and the running module, and improves the server protocol accuracy and communication security.
[0080] Embodiment 3:
[0081] Based on the same inventive concept, the application further provides a computer device, which comprises a processor and a memory, the memory is used for storing a computer program, the computer program comprises program instructions, and the processor is used for executing the program instructions stored in the computer storage medium. The processor can be a central processing unit (CPU), and can also be other general-purpose processors, digital signal processors (DSP), application specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components and the like, which are the computing core and control core of the terminal, are suitable for implementing one or more instructions, and are specifically suitable for loading and executing one or more instructions in the computer storage medium to implement a corresponding method flow or a corresponding function, so as to implement the steps of the local discovery server running method based on java in the above embodiment.
[0082] Embodiment 4:
[0083] Based on the same inventive concept, the present application also provides a storage medium, specifically a computer readable storage medium (Memory), which is a memory device in a computer device, used for storing programs and data. It can be understood that the computer readable storage medium here can include the built-in storage medium in the computer device, and of course can also include the extended storage medium supported by the computer device. The computer readable storage medium provides a storage space, which stores the operating system of the terminal. Moreover, one or more instructions suitable for being loaded and executed by the processor are also stored in the storage space, and these instructions can be one or more computer programs (including program codes). It should be noted that the computer readable storage medium here can be a high-speed RAM memory, or a non-volatile memory such as at least one disk memory. One or more instructions stored in the computer readable storage medium can be loaded and executed by the processor to implement the steps of the Java-based local discovery server running method in the above embodiment.
[0084] Those skilled in the art should understand that the embodiments of the present application can be provided as a method, a system, or a computer program product. Therefore, the present application can take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware aspects. Moreover, the present application can 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-ROMs, optical storage, etc.) containing computer-usable program code.
[0085] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each flow and / or block in the flowcharts and / or block diagrams, and the combination of the flows and / or blocks in the flowcharts and / or block diagrams can be implemented by computer program instructions. These computer program instructions can be provided to a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing devices to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing devices generate a means for implementing the functions specified in the flowcharts and / or block diagrams. Figure 1 The functions specified in one or more flows and / or blocks Figure 1 The means for implementing the functions specified in one or more flows and / or blocks.
[0086] These computer program instructions can also be stored in a computer readable storage medium, which can guide the computer or other programmable data processing devices to work in a specific manner, so that the instructions stored in the computer readable storage medium produce a product including instruction means, which implements the functions specified in the flowcharts and / or block diagrams. Figure 1 The functions specified in one or more flows and / or blocksFigure 1 the function specified in the one or more blocks.
[0087] These computer program instructions can also be loaded into computer or other programmable data processing devices, so that a series of operation steps are performed on the computer or other programmable data processing devices to generate computer-implemented processes, thus the instructions executed on the computer or other programmable data processing devices provide a process for implementing the flow Figure 1 the flow or flows and / or blocks Figure 1 the steps of the function specified in the one or more blocks.
[0088] It should be noted that the above examples are only used to illustrate the technical solutions of the present application but not to limit the protection scope thereof. Although the present application has been described in detail with reference to the above examples, it should be understood by those skilled in the art that the technical personnel in the art can make various changes, modifications or equivalent replacements to the specific embodiments of the application after reading the present application. However, these changes, modifications or equivalent replacements are all within the protection scope of the claims of the application to be examined.
[0089] Obviously, those skilled in the art can make various modifications and variations to the present application without departing from the spirit and scope of the present application. Thus, if these modifications and variations of the present application belong to the scope of the claims of the present application and their equivalent technologies, the present application also intends to include these modifications and variations.
Claims
1. A method for running a local discovery server based on Java, characterized in that, include: Retrieve server data from the local discovery server; Configure a protocol for the local discovery server based on the server data, and encrypt communication according to the protocol; Based on the aforementioned communication encryption and a preset server database, a server search is performed to obtain the target server, and registration is then carried out. The step of configuring the local discovery server protocol based on the server data includes: Based on the server data, deployment configuration is performed to obtain Java-readable configuration code; The configuration code is matched according to a preset configuration table to obtain the server configuration package and the corresponding configuration strategy; The server configuration package is deployed according to the configuration strategy to obtain the protocol for local discovery server configuration.
2. The method as described in claim 1, characterized in that, The communication encryption according to the protocol includes: Configure a server private key for the local discovery server according to the protocol; A certificate signing request is generated based on the server private key and server data, and then converted into a server signing certificate; Communication is encrypted using the server's private key and server signing certificate.
3. The method as described in claim 2, characterized in that, The server data includes: server address, server domain name, server resources, and authentication parameters.
4. The method as described in claim 1, characterized in that, The registration process includes: registering target devices on the local discovery server based on the milo library, and retrieving the registered devices to obtain the registered device information.
5. A Java-based local discovery server operating system, characterized in that, include: Collection module: Used to acquire server data from the local discovery server; Communication module: used to configure a protocol for the local discovery server based on the server data, and to encrypt communication according to the protocol; The operation module is used to perform server retrieval based on the communication encryption and the preset server library, obtain the target server, and perform registration processing. The communication module includes: Protocol submodule and encryption submodule; The protocol submodule includes: an encoding unit, a configuration unit, and a deployment unit; The encoding unit is used to perform deployment configuration based on the server data to obtain Java-readable configuration encoding; The configuration unit is used to match the configuration code according to a preset configuration table to obtain a server configuration package and a corresponding configuration strategy. The deployment unit is used to deploy the server configuration package according to the configuration policy to obtain a protocol for local discovery server configuration.
6. The system as described in claim 5, characterized in that, The encryption submodule includes: Private key unit: used to configure a server private key for the local discovery server according to the protocol; Signature unit: used to generate a certificate signing request based on the server private key and server data, and convert it into a server signing certificate; Encryption unit: Used to encrypt communication based on the server's private key and server signing certificate.
7. A computer device, characterized in that, include: One or more processors; Memory, used to store one or more programs; When the one or more programs are executed by the one or more processors, a Java-based local discovery server running method as described in any one of claims 1 to 4 is implemented.
Citation Information
Patent Citations
Method of enabling a secure communication to a target device over a network
CN113630374A
Configuration file transmission method, related equipment and storage medium
CN114124930A