Host and service access method thereof
Through the electrical connection between the host and the device, service data is accessed to independently develop and test the plug-in program, which solves the problem of high dependence and testing difficulty between the main program and the plug-in program, and achieves more flexible development and cross-platform goals. , reducing development costs and time.
Patent Information
- Application Number
- CN202310392223.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Priority Date
- 2023-03-15
- Filing Date
- 2023-04-13
- Publication Date
- 2024-09-20
AI Technical Summary
During the software development process, the high dependence between the main program and the plug-in program resulted in complex development. The development of the plug-in program was put on hold, and there was a lack of standard testing methods, making integration testing difficult and requiring additional manpower.
By realizing an electrical connection between the host and the device, searching for service data to access the plug-in user interface and service code, using the service code to connect to the service, and displaying the device status, independent development and testing of the plug-in program can be achieved.
It reduces the complexity of plug-in program development and the difficulty of integration testing, reduces development time and costs, and enables cross-platform development. The plug-in program has independent functions and scalability, saving the development team's debugging and integration time.
Smart Images

Figure CN118672571A
Abstract
Description
Technical Field
[0001] The present invention relates to a method for accessing services, and more particularly to a method for accessing program services. Background Art
[0002] At present, in the process of software development, the main program is developed by the customer, and the plug-in program is developed by multiple manufacturers for their own devices. The main program and the plug-in program are highly dependent on each other in the development architecture based on the Windows operating system. Because the user interface of the plug-in program also needs to be presented on the main program, the communication of each component is quite complicated. In addition, when developing a new architecture, the development of the plug-in program may be shelved due to the immaturity of the main program, which may cause problems in the development schedule.
[0003] In addition, during verification, because the plug-in program is dependent on the main program, it is not easy to have a standard testing method to allow each component to be tested independently in advance, resulting in various problems that may be encountered during the overall integration test. If additional development of the main program is required, additional manpower will be required. Summary of the invention
[0004] The method for accessing a service according to the embodiment of the present disclosure is applicable between a host and at least one device, and the host and at least one device are electrically connected to each other. The method includes: searching for service data associated with the service, the service includes a plug-in user interface and a service code, and the service data includes a first port number for accessing the plug-in user interface and the service code; based on the service data, searching whether the service code exists; if there is a service code, using the first port number to access the service code and the plug-in user interface; if the service code is successfully accessed, executing the service code to connect to the service, and obtaining the status of at least one device through the service; and displaying the status of at least one device on the plug-in user interface. BRIEF DESCRIPTION OF THE DRAWINGS
[0005] Figure 1 The present invention is a flowchart of a method for accessing services according to an embodiment of the present invention.
[0006] Figure 2 For the application of the embodiments of the present disclosure Figure 1 Schematic diagram of an electronic device 200 for implementing the method.
[0007] Figure 3 For the application of the embodiments of the present disclosure Figure 1 Schematic diagram of an electronic device 300 for implementing the method.
[0008] Figure 4 For the application of the embodiments of the present disclosure Figure 1 Schematic diagram of an electronic device 400 for implementing the method.
[0009] Figure 5For the embodiments of the present disclosure Figure 1 Configuration architecture diagram of the main program, plug-in user interface, and service code in the method.
[0010] Figure 6 For the embodiments of the present disclosure Figure 1 Configuration architecture diagram of the main program, plug-in user interface, and service code in the method.
[0011] Figure 7 For the embodiments of the present disclosure Figure 1 Configuration architecture diagram of the main program, plug-in user interface, and service code in the method.
[0012] The reference numerals are described as follows:
[0013] S100, S102, S104, S106, S108: Steps
[0014] S110, S112, S113, S114, S116, S117, S118: Steps
[0015] S120, S122, S124: Steps
[0016] 200: Electronic devices
[0017] 202, PC: Host
[0018] 204: Installation
[0019] 206: Service
[0020] 208: Light source controller
[0021] 210: LCD control chip
[0022] 212: Panel
[0023] 214: Processor
[0024] 216: Memory
[0025] 222, 224: Communication protocol
[0026] 300: Electronic devices
[0027] 302, PC: Host
[0028] 304: Installation
[0029] 306: Service
[0030] 308: Light source controller
[0031] 310: LCD control chip
[0032] 312: Panel
[0033] 314, MCU: microcontroller
[0034] 316, HUB: Router
[0035] 320, 322, 324, 326: Communication protocols
[0036] 400: Electronic devices
[0037] 402, PC: Host
[0038] 404, 418: Device
[0039] 406: Service
[0040] 408: Light source controller
[0041] 410: LCD control chip
[0042] 412: Panel
[0043] 414, MCU: microcontroller
[0044] 416: Interface Converter
[0045] 420, 422, 424, 426, 428, 430: Communication protocols
[0046] 500: Main program
[0047] 502, 508: External User Interface
[0048] 504, 510: Service code
[0049] 506, 512: Communication control code
[0050] 520, 522, 524, 526, 528, 530: Communication protocols
[0051] 532, 534, 536, 538: Communication protocols
[0052] 540, 542: Subroutine
[0053] 550: Light source controller
[0054] 552: LCD control chip
[0055] 560: Display
[0056] 600: Main program
[0057] 602: Plugin User Interface
[0058] 604: Service code
[0059] 606, 608: Communication control code
[0060] 620, 622, 624, 626, 628, 630, 632: Communication protocols
[0061] 640: Subroutine
[0062] 650: Light source controller
[0063] 652: LCD control chip
[0064] 660: Display
[0065] 700: Main program
[0066] 702: Add service code to external user interface
[0067] 704, 706: Communication control code
[0068] 708: Subroutine
[0069] 720, 722, 724, 726, 728: Communication protocols
[0070] 730, 732, 734: Communication protocol
[0071] 750, 754: Light source controller
[0072] 752, 756: LCD control chip
[0073] 760, 762: Display DETAILED DESCRIPTION
[0074] Reference will now be made in detail to exemplary embodiments of the present disclosure, examples of which are illustrated in the accompanying drawings. Whenever possible, the same reference numerals are used in the drawings and description to refer to the same or like parts.
[0075] Certain words are used throughout the specification and claims to refer to specific components. It should be understood by those skilled in the art that electronic device manufacturers may refer to the same components by different names. It is not intended to distinguish between components that have the same function but different names. In the following specification and claims, the words "including" and "comprising" are open-ended words and should be interpreted as "including but not limited to...".
[0076] Directional terms mentioned herein, such as "up", "down", "front", "back", "left", "right", etc., are only reference directions of the drawings. Therefore, the directional terms used are for illustration and not for limiting the present disclosure. In the drawings, each diagram depicts the general characteristics of the methods, structures and / or materials used in a particular embodiment. However, these drawings should not be interpreted as defining or limiting the scope or properties covered by these embodiments. For example, for clarity, the relative size, thickness and position of each film layer, region and / or structure may be reduced or enlarged.
[0077] A structure (or layer, component, substrate) described in the present disclosure is located on / above another structure (or layer, element, substrate), which may refer to the two structures being adjacent and directly connected, or it may refer to the two structures being adjacent but not directly connected. Indirect connection means that there is at least one intermediate structure (or intermediate layer, intermediate component, intermediate substrate, intermediate interval) between the two structures, the lower surface of one structure is adjacent to or directly connected to the upper surface of the intermediate structure, and the upper surface of the other structure is adjacent to or directly connected to the lower surface of the intermediate structure. The intermediate structure may be composed of a single-layer or multi-layer physical structure or a non-physical structure, without limitation. In the present disclosure, when a certain structure is disposed "on" another structure, it may refer to that the certain structure is "directly" on the other structure, or that the certain structure is "indirectly" on the other structure, that is, at least one structure is sandwiched between the certain structure and the other structure.
[0078] The terms "approximately", "equal to", "equal" or "same", "substantially" or "approximately" are generally interpreted as within 20% of a given value or range, or as within 10%, 5%, 3%, 2%, 1% or 0.5% of a given value or range. Ordinal numbers such as "first", "second", etc. used in the specification and claims are used to modify elements. They themselves do not imply or represent any previous ordinal numbers of the (or those) elements, nor do they represent the order of one element and another element, or the order in the manufacturing method. The use of these ordinals is only used to make a component with a certain name clearly distinguishable from another component with the same name. The same words may not be used in the claims and the specification. Accordingly, the first component in the specification may be the second component in the claims.
[0079] The electrical connection or coupling described in the present disclosure may refer to direct connection or indirect connection. In the case of direct connection, the endpoints of the components on the two circuits are directly connected or connected to each other by a conductor segment, and in the case of indirect connection, there is a switch, diode, capacitor, inductor, resistor, other suitable components, or a combination of the above components between the endpoints of the components on the two circuits, but it is not limited to these.
[0080] In the present disclosure, the thickness, length and width can be measured by an optical microscope, and the thickness or width can be measured by a cross-sectional image in an electron microscope, but it is not limited to this. In addition, there may be a certain error between any two values or directions used for comparison. In addition, the terms "equal", "equal", "same", "substantially" or "approximately" mentioned in the present disclosure generally represent falling within 10% of a given value or range. In addition, the terms "a given range is from a first value to a second value", "a given range falls within the range from a first value to a second value" indicate that the given range includes the first value, the second value and other values therebetween. If the first direction is perpendicular to the second direction, the angle between the first direction and the second direction may be between 80 degrees and 100 degrees; if the first direction is parallel to the second direction, the angle between the first direction and the second direction may be between 0 degrees and 10 degrees.
[0081] It should be noted that the following embodiments can replace, reorganize, or mix features in several different embodiments to complete other embodiments without departing from the spirit of the present disclosure. Features between embodiments can be mixed and matched as long as they do not violate the spirit of the invention or conflict with each other.
[0082] Unless otherwise defined, all terms (including technical and scientific terms) used herein have the same meanings as commonly understood by those skilled in the art to which the present disclosure belongs. It is understood that these terms, such as those defined in commonly used dictionaries, should be interpreted as having a meaning consistent with the background or context of the relevant technology and the present disclosure, and should not be interpreted in an idealized or overly formal manner unless specifically defined in the embodiments of the present disclosure.
[0083] Figure 1 The flowchart of the method for accessing services of the embodiment of the present disclosure is shown in FIG. The method for accessing services of the present disclosure is applicable between a host and at least one device, and the host and at least one device are electrically connected to each other. The service includes a user interface and a service code. Figure 1As shown, the method for accessing a service disclosed in the present invention includes: executing a main program to display a main user interface (step S100); searching for service data associated with the service, the service data including a first port number for accessing the user interface and a service code (step S102); searching for whether a service code exists based on the service data (step S104); searching for whether a service name associated with the service exists (step S106); using the first port number to access the service code and the user interface, and whether the access is successful (step S108); updating the port number (step S110); executing the service code to connect to the service (step S112); obtaining the status of at least one device through the service (step S113); detecting whether at least one device exists (step S114); embedding the user interface of the service into the main user interface (step S120); and displaying the status of at least one device on the user interface (step S122).
[0084] Specifically, the main program in step S100 is a program code that can execute multiple functions, but the present disclosure is not limited thereto. In some embodiments, the main program is usually executed by a processor in the host, but the present disclosure is not limited thereto. In some embodiments, the present disclosure executes the main program to display a main user interface. In some embodiments, the service in step S100 may be, for example, a service provided by a plug-in program, but the present disclosure is not limited thereto. In some embodiments, the user interface in step S102 may be, for example, a plug-in user interface, but the present disclosure is not limited thereto. In some embodiments, the service data in step S102 includes, in addition to the first port number for accessing the user interface and the service code, a communication interface type corresponding to at least one device, a vendor ID (VID), a product ID (PID), a storage path of the plug-in user interface, a storage path of the service code, a service name of the plug-in user interface, and a service name of the service code, but the present disclosure is not limited thereto. In step S104, if the search result is that there is a service code, the present disclosure executes step S106 to search whether there is a service name associated with the service. If the search result is that there is no service code, the present disclosure directly ends the process (step S124). In some embodiments, step S106 can be omitted. In other words, if the search result is that there is a service code, the present disclosure directly executes step S108, but the present disclosure is not limited to this. In step S106, if there is a service name associated with the service, the present disclosure can obtain the port number (step S116). In some embodiments, the port number in step S116 can be, for example, a default port number. In some embodiments, the present disclosure can use the port number to access the service code and the plug-in user interface (step S117), and directly execute step S112 after the access is successful.
[0085] In step S106, if there is no service name associated with the service, the present disclosure executes step S108, i.e., accesses the service code and the plug-in user interface using the first port number in step S102, and confirms whether the access is successful. In step S108, if the service code cannot be accessed, i.e., the first port number may have been occupied, the present disclosure uses a second port number to access the service code and the plug-in user interface (step S118). Then, the present disclosure executes step S110, i.e., updates the port number. For example, when step S108 is "no", the present disclosure sets the second port number as the port number in step S110. When step S108 is "yes", the present disclosure sets the first port number as the port number in step S110. Other programs and the main program can use the port number for access the next time they are executed. Then, in step S112, the present disclosure executes the service code to connect to the service. Then, in step S113, the present disclosure obtains the status of at least one device through the service. In step S114, the present disclosure detects whether at least one device exists. In other words, the present disclosure detects whether at least one device is electrically connected to the host. If at least one device is detected to be electrically connected to the host, the present disclosure executes step S120. If at least one device is not detected to be electrically connected to the host, the present disclosure directly ends the process (step S124).
[0086] In some embodiments, each of the first port number in step S108 and the second port number in step S118, as well as the port number in step S116, includes a first sub-port number and a second sub-port number. The first sub-port number is used to access the plug-in user interface of the service. The second sub-port number is used to access the service code of the service, but the present disclosure is not limited to this. In step S120, the present disclosure embeds the plug-in user interface of the service into the main user interface of the main program. For example, the plug-in user interface can be displayed in a portion of the main user interface, but the present disclosure is not limited to this. In step S122, the present disclosure displays the status of at least one device obtained in step S112 in the plug-in user interface. Afterwards, the present disclosure ends the process of accessing the service (step S124).
[0087] Figure 2 For the application of the embodiments of the present disclosure Figure 1 Schematic diagram of an electronic device 200 for implementing the method. Figure 2As shown, the electronic device 200 includes a host (PC) 202 and a device 204. The host 202 includes a processor 214 and a memory 216. In some embodiments, the host 202 may be, for example, a personal computer (PC), a workstation server, or a cloud server, but the disclosure is not limited thereto. In some embodiments, the service 206 is stored in the host 202. The service 206 may include an external user interface and a service code. The service 206 may be, for example, stored in the memory 216 of the host 202, but the disclosure is not limited thereto. In some embodiments, the device 204 may be, for example, a display. The device 204 includes a light source controller 208, a liquid crystal control chip 210, and a panel 212. The light source controller 208 communicates with the host 202 via a communication protocol 220. In some embodiments, the communication protocol 220 may be, for example, a universal serial bus (USB), but the disclosure is not limited thereto. The liquid crystal control chip communicates with the host 202 via a communication protocol 222. In some embodiments, the communication protocol 222 may be, for example, a display data channel command interface (DDCCI), but the disclosure is not limited thereto. The liquid crystal control chip 210 outputs a control signal to the panel 212 via a communication protocol 224. In some embodiments, the communication protocol 224 may be, for example, an embedded display port (eDP), but the disclosure is not limited thereto.
[0088] In some embodiments, the processor 214 of the host 202 accesses the service 206 stored in the memory 216. The processor 214 of the host 202 first executes a main program to generate a main user interface and searches for service data associated with the service 206. In some embodiments, the service 206 includes a plug-in user interface and a service code. The service data may, for example, include a first port number for accessing the plug-in user interface and the service code. Then, the processor 214 of the host 202 searches for whether the service 206 exists based on the service data associated with the service 206. If it is determined that the service 206 exists, the processor 214 of the host 202 continues to search for whether there is a service name associated with the service 206. If the service name associated with the service 206 does not exist, the processor 214 of the host 202 uses the first port number to access the service code and the plug-in user interface of the service 206, and then determines whether the access is successful. If the access to the service code and the plug-in user interface of the service 206 is successful, the processor 214 of the host 202 executes the service code of the service 206 and updates the default port number. For example, the processor 214 of the host 202 sets the first port number as a new default port number. After executing the service code of the service 206, the processor 214 of the host 202 connects to the service 206 and obtains the status of the device 204 through the service 206. For example, the processor 214 of the host 202 obtains the status of the light source controller 208 through the communication protocol 220. The processor 214 of the host 202 obtains the status of the liquid crystal control chip 210 through the communication protocol 222.
[0089] Afterwards, the processor 214 of the host 202 detects whether the light source controller 208 and the liquid crystal control chip 210 are still present. If at least one device is present, the processor 214 of the host 202 embeds the plug-in user interface associated with the service 206 in the main user interface, and displays the status of at least one device (e.g., the light source controller 208, the liquid crystal control chip 210) in the plug-in user interface associated with the service 206. In some embodiments, if there is a service name associated with the service 206, the processor 214 of the host 202 obtains a default port number and accesses the service code associated with the service 206 using the default port number. If there is no service name associated with the service 206 and the service code associated with the service 206 cannot be accessed, the processor 214 of the host 202 accesses the service code and the plug-in user interface associated with the service 206 using a second port number, and sets the second port number as the default port number.
[0090] Figure 3 For the application of the embodiments of the present disclosure Figure 1 Schematic diagram of an electronic device 300 for implementing the method. Figure 3As shown, the electronic device 300 includes a host (PC) 302, a router (HUB) 316, and a device 304. In some embodiments, the host 302 may be, for example, a personal computer (PC), a workstation server, or a cloud server, but the present disclosure is not limited thereto. The router 316 is electrically connected between the host 302 and the device 304, and serves as a network intermediary between the host 302 and the device 304. The host 302 communicates with the device 304 via a communication protocol 320. In some embodiments, the communication protocol 320 is the Internet, but the present disclosure is not limited thereto. In some embodiments, the device 304 may be, for example, a display. The device 304 includes a light source controller 308, a liquid crystal control chip 310, a panel 312, and a microcontroller (MCU) 314. The microcontroller 314 is electrically connected to the router 316 via the communication protocol 320 to communicate with the host 302. The microcontroller 314 communicates with the liquid crystal control chip 310 via a communication protocol 322, and communicates with the light source controller 308 via a communication protocol 326. In some embodiments, the communication protocol 322 may be, for example, a display data channel command interface (DDCCI), but the present disclosure is not limited thereto. The communication protocol 326 may be, for example, a universal serial bus (USB) or an inter-integrated circuit bus (ICB). 2 C), but the present disclosure is not limited thereto. The liquid crystal control chip 310 outputs a control signal to the panel 312 via a communication protocol 324. In some embodiments, the communication protocol 324 may be, for example, an embedded display port (eDP), but the present disclosure is not limited thereto.
[0091] In some embodiments, the service 306 is stored in the microcontroller 314. The service 306 may include a plug-in user interface and a service code. The service 306 may be stored in a memory (not shown) of the microcontroller 314, for example, but the present disclosure is not limited thereto. The processor of the host 302 first executes a main program to generate a main user interface. The microcontroller 314 searches for service data associated with the service 306. The service data may, for example, include a first port number for accessing the plug-in user interface and the service code. Then, the microcontroller 314 searches for service 306 based on the service data associated with the service 306. If it is determined that the service 306 exists, the microcontroller 314 continues to search for a service name associated with the service 306. If the service name associated with the service 306 does not exist, the microcontroller 314 uses the first port number to access the service code and the plug-in user interface of the service 306, and then determines whether the access is successful. If the access to the service code and the plug-in user interface of the service 306 is successful, the microcontroller 314 executes the service code of the service 306 and updates the default port number. For example, the microcontroller 314 sets the first port number as a new default port number. After executing the service code of the service 306, the microcontroller 314 connects to the service 306 and obtains the status of the device 304 through the service 306. For example, the microcontroller 314 obtains the status of the light source controller 308 through the communication protocol 326. The microcontroller 314 obtains the status of the liquid crystal control chip 310 through the communication protocol 322.
[0092] Afterwards, the microcontroller 314 detects whether the light source controller 308 and the liquid crystal control chip 310 are still present. If at least one device is present, the processor of the host 302 embeds the plug-in user interface associated with the service 306 in the main user interface, and displays the status of at least one device (e.g., the light source controller 308, the liquid crystal control chip 310) in the plug-in user interface associated with the service 306. In some embodiments, the processor of the host 302 obtains the plug-in user interface of the service 306 through the communication protocol 320, so as to embed the plug-in user interface associated with the service 306 in the main user interface. The processor of the host 302 obtains the status of the light source controller 308 and the liquid crystal control chip 310 through the communication protocol 320, so as to display the status of the light source controller 308 and the liquid crystal control chip 310 in the plug-in user interface associated with the service 306 in the main user interface. In some embodiments, if there is a service name associated with the service 306, the microcontroller 314 obtains a default port number, and uses the default port number to access the service code associated with the service 306. If there is no service name associated with the service 306 and the service code associated with the service 306 cannot be accessed, the microcontroller 314 uses a second port number to access the service code and the plug-in user interface associated with the service 306 and sets the second port number as a default port number.
[0093] Figure 4 For the application of the embodiments of the present disclosure Figure 1 Schematic diagram of an electronic device 400 for implementing the method. Figure 4 As shown, the electronic device 400 includes a host (PC) 402, a device 404, and a device 418. In some embodiments, the host 402 may be, for example, a personal computer (PC), a workstation server, or a cloud server, but the present disclosure is not limited thereto. The host 402 communicates with the device 404 via a communication protocol 420, and communicates with the device 418 via a communication protocol 430. In some embodiments, the communication protocol 420 and the communication protocol 430 may be, for example, a universal serial bus (USB), but the present disclosure is not limited thereto. In some embodiments, the device 404 may be, for example, a display. The device 404 includes a light source controller 408, a liquid crystal control chip 410, a panel 412, a microcontroller (MCU) 414, and an interface converter 416. The interface converter 416 is used to convert the communication protocol 420 into a communication protocol 424. In some embodiments, the communication protocol 424 may be, for example, the Internet. The microcontroller 414 communicates with the liquid crystal control chip 410 via a communication protocol 422, and communicates with the light source controller 408 via a communication protocol 426. In some embodiments, the communication protocol 422 may be, for example, a display data channel command interface (DDCCI), but the present disclosure is not limited thereto. The communication protocol 426 may be, for example, a universal serial bus (USB) or an integrated circuit bus (ICB). 2 C), but the present disclosure is not limited thereto. The liquid crystal control chip 410 outputs a control signal to the panel 412 via a communication protocol 424. In some embodiments, the communication protocol 424 may be, for example, an embedded display port (eDP), but the present disclosure is not limited thereto.
[0094] In some embodiments, the service 406 is stored in the microcontroller 414. The service 406 may include an external user interface and a service code. The service 406 may be stored in a memory (not shown) of the microcontroller 414, for example, but the present disclosure is not limited thereto. The processor of the host 402 first executes a main program to generate a main user interface. The microcontroller 414 searches for service data associated with the service 406. The service data may, for example, include a first port number for accessing the external user interface and the service code. Then, the microcontroller 414 searches for service data associated with the service 406 to determine whether the service 406 exists. If it is determined that the service 406 exists, the microcontroller 414 continues to search for a service name associated with the service 406. If the service name associated with the service 406 does not exist, the microcontroller 414 uses the first port number to access the service code and the external user interface of the service 406, and then determines whether the access is successful. If the access to the service code and the external user interface of the service 406 is successful, the microcontroller 414 executes the service code of the service 406 and updates the default port number. For example, the microcontroller 414 sets the first port number as a new default port number. After executing the service code of the service 406, the microcontroller 414 connects to the service 406 and obtains the status of the device 404 through the service 406. For example, the microcontroller 414 obtains the status of the light source controller 408 through the communication protocol 426. The microcontroller 414 obtains the status of the liquid crystal control chip 410 through the communication protocol 422.
[0095] Afterwards, the microcontroller 414 detects whether the light source controller 408 and the liquid crystal control chip 410 are still present. If at least one device is present, the processor of the host 402 embeds the plug-in user interface associated with the service 406 in the main user interface, and displays the status of at least one device (e.g., the light source controller 408, the liquid crystal control chip 410) in the plug-in user interface associated with the service 406. In some embodiments, the interface converter 416 obtains the plug-in user interface of the service 406 from the microcontroller 414 through the communication protocol 424, and then transmits the plug-in user interface of the service 406 to the host 402. The processor of the host 402 obtains the plug-in user interface of the service 406 through the communication protocol 420, and embeds the plug-in user interface associated with the service 406 in the main user interface. The processor of the host 402 obtains the status of the light source controller 408 and the liquid crystal control chip 410 through the communication protocol 420, and displays the status of the light source controller 408 and the liquid crystal control chip 410 in the plug-in user interface associated with the service 406 in the main user interface. In some embodiments, if there is a service name associated with the service 406, the microcontroller 414 obtains a default port number and uses the default port number to access the service code associated with the service 406. If there is no service name associated with the service 406 and the service code associated with the service 406 cannot be accessed, the microcontroller 414 uses a second port number to access the service code and the plug-in user interface associated with the service 406, and sets the second port number as the default port number. In some embodiments, in some embodiments, even if the device 404 and the device 418 have the same port number in the Internet, the host 402 can also use different USB port numbers to distinguish between the device 404 and the device 418 to access the service stored in the device 404 or the device 418.
[0096] Figure 5 For the embodiments of the present disclosure Figure 1 The configuration architecture diagram of the main program, plug-in user interface, and service code in the method. Figure 5As shown, the main program 500 can use independent subprograms (e.g., subprogram 540 and subprogram 542) to obtain the state of the light source controller 550 and the state of the liquid crystal controller 552 in the display 560. In detail, the subprogram 540 includes an external user interface 502, a service code 504, and a communication control code. The subprogram 542 includes an external user interface 508, a service code 510, and a communication control code 512. The main program 500 and the external user interface 502 call and communicate with each other through a communication protocol 520. In some embodiments, the communication protocol 520 can be, for example, HyperText Markup Language (HTML). The main program 500 and the external user interface 508 call and communicate with each other through a communication protocol 522. In some embodiments, the communication protocol 522 can be, for example, HyperText Markup Language (HTML). In other words, the external user interface 502 and the external user interface 508 can be a web page respectively, but the present disclosure is not limited thereto. The main program 500 and the service code 504 call and communicate with each other through a communication protocol 524. In some embodiments, the communication protocol 524 may be, for example, an open application programming interface specification (Open Application Programming Interface Specification: Open API). The main program 500 and the service code 510 call and communicate with each other through a communication protocol 526. In some embodiments, the communication protocol 524 may be, for example, an open application programming interface specification (Open API).
[0097] The external user interface 502 and the service code 504 call and communicate with each other through a communication protocol 528. In some embodiments, the communication protocol 528 may be, for example, an open application program interface specification (Open API). Similarly, the external user interface 508 and the service code 510 call and communicate with each other through a communication protocol 530. In some embodiments, the communication protocol 530 may be, for example, an open application program interface specification (Open API). The service code 504 and the communication control code 506 call and communicate with each other through a communication protocol 532. In some embodiments, the communication protocol 532 may be, for example, an open application program interface specification (Open API) or a function call. Similarly, the service code 510 and the communication control code 512 call and communicate with each other through a communication protocol 534. In some embodiments, the communication protocol 534 may be, for example, an open application program interface specification (Open API) or a function call. In some embodiments, the communication control code 506 is an application program interface (API) for controlling the light source controller 550. The communication control code 512 is an application program interface (API) for controlling the liquid crystal control chip 552. The communication control code 506 controls the light source controller 550 via a communication protocol 536. In some embodiments, the communication protocol 536 may be, for example, a universal serial bus (USB). The communication control code 512 controls the liquid crystal control chip 552 via a communication protocol 538. In some embodiments, the communication protocol 538 may be, for example, a display data channel command interface (DDCCI).
[0098] Figure 6 For the embodiments of the present disclosure Figure 1 The configuration architecture diagram of the main program, plug-in user interface, and service code in the method. Figure 6 As shown, the main program 600 can use a single subroutine (e.g., subroutine 640) to obtain the status of the light source controller 650 and the status of the liquid crystal controller 652 in the display 660. In detail, the subroutine 640 includes an external user interface 602, a service code 604, a communication control code 606, and a communication control code 608. Figure 5 Compared with the embodiment, Figure 6 The embodiment reduces the number of services, for example, from 2 services to 1 service. The main program 600 and the plug-in user interface 602 call and communicate with each other through a communication protocol 620. In some embodiments, the communication protocol 620 may be, for example, Hypertext Markup Language (HTML). In other words, the plug-in user interface 602 may be a web page, but the present disclosure is not limited thereto. The main program 600 and the service code 604 call and communicate with each other through a communication protocol 624. In some embodiments, the communication protocol 624 may be, for example, an open application program interface specification (Open API).
[0099] The plug-in user interface 602 and the service code 604 call and communicate with each other through a communication protocol 622. In some embodiments, the communication protocol 622 may be, for example, an open application program interface specification (Open API). The service code 604 and the communication control code 606 call and communicate with each other through a communication protocol 626. In some embodiments, the communication protocol 626 may be, for example, an open application program interface specification (Open API) or a function call. Similarly, the service code 604 and the communication control code 608 call and communicate with each other through a communication protocol 628. In some embodiments, the communication protocol 628 may be, for example, an open application program interface specification (Open API) or a function call. In some embodiments, the communication control code 606 is an application program interface (API) for controlling the light source controller 650. The communication control code 608 is an application program interface (API) for controlling the liquid crystal control chip 652. The communication control code 606 controls the light source controller 650 through a communication protocol 630. In some embodiments, the communication protocol 630 may be, for example, a universal serial bus (USB). The communication control code 608 controls the liquid crystal control chip 652 via a communication protocol 632. In some embodiments, the communication protocol 632 may be, for example, a display data channel command interface (DDCCI).
[0100] Figure 7 For the embodiments of the present disclosure Figure 1 The configuration architecture diagram of the main program, plug-in user interface, and service code in the method. Figure 7As shown, the main program 700 can use a single subroutine (e.g., subroutine 708) to obtain the state of the light source controller 750 and the state of the liquid crystal controller 752 in the display 760, and obtain the state of the light source controller 754 and the state of the liquid crystal controller 756 in the display 762. In detail, the subroutine 708 includes a plug-in user interface plus service code 702, a communication control code 704, and a communication control code 706. In some embodiments, the plug-in user interface plus service code 702 integrates the plug-in user interface and service code of the service. The main program 700 and the plug-in user interface plus service code 702 call and communicate with each other through a communication protocol 720 and a communication protocol 722. In detail, the main program 700 accesses the plug-in user interface in the plug-in user interface plus service code 702 through the communication protocol 720. On the other hand, the main program 700 accesses the service code in the plug-in user interface plus service code 702 through the communication protocol 722. In some embodiments, the communication protocol 720 can be, for example, Hypertext Markup Language (HTML). In other words, the plug-in user interface plus the plug-in user interface in the service code 702 can be a web page, but the present disclosure is not limited thereto. In some embodiments, the communication protocol 722 can be, for example, an open application program interface specification (Open API).
[0101] The plug-in user interface plus service code 702 and communication control code 704 call and communicate with each other through a communication protocol 724. In some embodiments, the communication protocol 724 may be, for example, an open application program interface specification (Open API) or a function call. Similarly, the plug-in user interface plus service code 702 and communication control code 706 call and communicate with each other through a communication protocol 734. In some embodiments, the communication protocol 734 may be, for example, an open application program interface specification (Open API) or a function call. In some embodiments, the communication control code 704 is an application program interface (API) for controlling the light source controller 750 and the light source controller 754. The communication control code 706 is an application program interface (API) for controlling the liquid crystal control chip 752 and the liquid crystal control chip 756. The communication control code 704 controls the light source controller 750 through a communication protocol 726. The communication control code 704 controls the light source controller 754 through a communication protocol 730. In some embodiments, the communication protocol 726 and the communication protocol 730 may be, for example, a universal serial bus (USB). The communication control code 706 controls the liquid crystal control chip 752 via a communication protocol 728. The communication control code 706 controls the liquid crystal control chip 756 via a communication protocol 732. In some embodiments, the communication protocol 728 and the communication protocol 732 may be, for example, a display data channel command interface (DDCCI).
[0102] Table 1 is a schematic table of service data associated with a service.
[0103]
[0104] Table 1
[0105] As shown in Table 1, the present disclosure Figure 1 The method for accessing services searches for 2 services of 2 devices. The embodiment of Table 1 is applied to Figure 2 In the electronic device 200. That is, the service is stored in the host side. For example, for the device DQ241H, the communication interface is the universal serial bus (USB), the product number is 0x1234, the manufacturer number is 0xABCD, the storage path of the service code is C:\dev\pluginA.service, the storage path of the plug-in user interface is C:\dev\pluginA_UI.service, the service name of the service code is DQ241HSrv, the service name of the plug-in user interface is DQ241HUISrv, the service code port number is 7000, and the plug-in user interface port number is 7001. On the other hand, for the device DA232H, the communication interface is the Display Data Channel Command Interface (DDCCI), the product number is 0x4321, the manufacturer number is 0xDCBA, the storage path of the service code is C:\dev\pluginB.service, the storage path of the plug-in user interface is C:\dev\pluginB_UI.service, the service name of the service code is DQ232HSrv, the service name of the plug-in user interface is DQ232HUISrv, the service code port number is 6000, and the plug-in user interface port number is 6001.
[0106] In some embodiments, if the service is stored in the device DQ241H and the device DA232H respectively, the storage path of the service code of the device DQ241H will become http: / / dev / pluginA.service, and the storage path of the plug-in user interface of the device DQ241H will become http: / / dev / pluginA_UI.service. Similarly, the storage path of the service code of the device DA232H will become http: / / dev / pluginB.service, and the storage path of the plug-in user interface of the device DA232H will become http: / / dev / pluginB_UI.service.
[0107] The method disclosed in the present invention separates the plug-in program from the main program, which can achieve more flexible development and reduce integration time. When the method disclosed in the present invention places the plug-in user interface on the device side, it can further achieve the goal of cross-platform and reduce the development time for different platforms. The service (or plug-in program) in the method disclosed in the present invention has independent functions and scalability, which can save the development time and development cost of the plug-in program, save the debugging and integration development time of each development group, reduce the development time during cross-platform development, and have the function of remote management. The plug-in user interface and device control in the method disclosed in the present invention can be integrated together, and the same components can be used regardless of the modification architecture of the main program, as long as the access method uses open data, such as hypertext markup language (html) and open application program interface specifications (open API).
[0108] The plug-in user interface and the underlying device control in the disclosed method can be completely independent, and the modification of the plug-in user interface and the underlying device control can be completely independent. The plug-in program in the disclosed method can also be provided to a third-party program for access as an independent program without the need for additional development. In addition to being able to connect with the main program, the plug-in program in the disclosed method can also provide additional functions, and does not need to be bound to the main program. For example, if the user has 2 to 3 main programs with different functions, but their purpose is to control the functions of the device, the plug-in program disclosed in the present invention can solve the trouble of requiring additional integration for each main program.
[0109] Although the embodiments of the present disclosure are described above, it should be understood that what is presented above is only an example and not a limitation. Many changes to the above exemplary embodiments can be implemented without violating the spirit and scope of the disclosure according to the present embodiment. Therefore, the breadth and scope of the present disclosure should not be limited by the embodiments described above. Rather, the scope of the present disclosure should be defined by the following claims and their equivalents. Although the above disclosure has been illustrated and described by one or more related executions, equivalent changes and modifications will be thought of by others who are familiar with this field based on the above specifications and drawings. In addition, although a particular feature of the present disclosure has been demonstrated by one of the related multiple executions, the above feature may be combined with one or more other features so that there may be a need and help for any known or special application.
[0110] The professional terms used in this specification are only for the purpose of describing specific embodiments and are not intended to be used as limitations of the present disclosure. Unless the context clearly indicates otherwise, the singular, the one, the above and the above are also meant to include the plural. Furthermore, the words "include", "comprise", "have", "have", or their variations are either used as detailed descriptions or as claims. The above words mean to include, and to some extent are equivalent to the word "include". Unless there are different definitions, all the terms used in this article (including technical or scientific terms) can be generally understood by people with general skills in the above-disclosed technology. We should be more aware that the above words, such as those defined in commonly used dictionaries, should be interpreted as the same meaning in the context of the relevant technology. Unless explicitly defined in this article, the above words will not be interpreted as idealized or overly formal.
Claims
1. A method for accessing a service, applicable between a host and at least one device, the host and the at least one device are electrically connected to each other, wherein the service includes a user interface and a service code, the method comprising: Searching for service data associated with the service; wherein the service data includes a first port number for accessing the user interface and the service code; Based on the service data, searching whether the service code exists; If the service code exists, access the service code and the user interface using the first port number; If the service code is successfully accessed, executing the service code to connect to the service, and obtaining the status of the at least one device through the service; and The status of the at least one device is displayed on the user interface.
2. The method of claim 1, further comprising: If the service code exists, searching whether there is a service name associated with the service; If there is a service name associated with the service, obtain a port number; as well as The service code is accessed using the port number.
3. The method of claim 2, further comprising: If the service code is successfully accessed, the port number is updated.
4. The method of claim 2, further comprising: If there is no service name associated with the service and the service code cannot be accessed, a second port number is used to access the service code and the user interface.
5. The method of claim 1, further comprising: After obtaining the status of the at least one device through the service, detecting whether the at least one device exists.
6. The method of claim 1, wherein: The user interface is a plug-in user interface.
7. The method of claim 1, wherein: The user interface and the service code are stored in the host or the at least one device.
8. The method of claim 1, wherein: The user interface is a web page.
9. The method of claim 1, wherein: The service data further includes: a communication interface type corresponding to the at least one device, a manufacturer code, a product code, a storage path of the user interface, a storage path of the service code, a service name of the user interface, and at least two of the service name of the service code.
10. The method of claim 1, wherein: The first port number includes a first sub-port number and a second sub-port number; the first sub-port number is used to access the user interface, and the second sub-port number is used to access the service code.
11. The method of claim 1, further comprising: Before searching the service data, executing a main program to display a main user interface; as well as The user interface of the service is embedded in the main user interface.
12. The method of claim 1, wherein: The user interface and the service code call and communicate with each other through an open application program interface specification.
13. The method of claim 11, wherein: The main program and the user interface call and communicate with each other through a hypertext markup language.
14. The method of claim 3, further comprising: Before searching the service data, executing a main program to display a main user interface; If there is no service name associated with the service and the service code cannot be accessed, accessing the service code and the user interface using a second port number; After obtaining the status of the at least one device through the service, detecting whether the at least one device exists; as well as If the at least one device exists, the user interface of the service is embedded in the main user interface.
15. A host, electrically connected to at least one device, comprising: A memory storing a service; wherein the service includes a user interface and a service code; A processor for executing: Searching for service data associated with the service; wherein the service data includes a first port number for accessing the user interface and the service code; Based on the service data, searching whether the service code exists; If the service code exists, access the service code and the user interface using the first port number; If the service code is successfully accessed, executing the service code to connect to the service, and obtaining the status of the at least one device through the service; and The status of the at least one device is displayed on the user interface.
16. The host according to claim 15, wherein: Before the processor searches for the service data, the processor executes a main program for displaying a main user interface; the processor embeds the user interface of the service into the main user interface.
17. The host according to claim 15, wherein: If the service code exists, the processor searches whether there is a service name associated with the service; if the service name associated with the service exists, the processor obtains a port number; and the processor accesses the service code using the port number.
18. The host according to claim 17, wherein: If the service code is successfully accessed, the processor updates the port number; if there is no service name associated with the service and the service code cannot be accessed, the processor uses a second port number to access the service code and the user interface.
19. The host according to claim 15, wherein: After the processor obtains the state of the at least one device through the service, the processor detects whether the at least one device exists.
20. The host according to claim 15, wherein: The user interface is a web page.
