Access method and electronic device

By sorting access information and generating a logical order request instruction set, the problem of conflicts during the access process of hardware devices is solved, and the correct data feedback and the success of the access process is achieved.

CN114443518BActive Publication Date: 2024-11-26LENOVO (BEIJING) LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202210112425.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-01-29
Publication Date
2024-11-26
Estimated Expiration
2042-01-29

AI Technical Summary

Technical Problem

When accessing and controlling hardware devices, there are often problems of conflicting access processes, resulting in information confusion and data loss during processing.

Method used

By obtaining access information, sorting its processing order based on preset sorting methods, and generating a corresponding request instruction set to ensure the logical order of the request instruction set, thereby avoiding conflicts and achieving correct data feedback from the target device.

Benefits of technology

It effectively avoids conflicts between requested instruction sets, ensures that the target device can handle each instruction correctly, and ensures the success of the access process and the accuracy of the data.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114443518B_ABST
    Figure CN114443518B_ABST
Patent Text Reader

Abstract

The present application discloses an access method and an electronic device, the method comprising: obtaining at least one access information for accessing a target device; sorting the processing order of the access information based on a preset sorting method; obtaining a request instruction set corresponding to the currently processed access information based on the processing order, generating a first access request and a first acquisition request corresponding to the request instruction set, wherein the request instruction set is used to request to obtain target data from the target device; obtaining the target data from the target device based on at least the first access request and the first acquisition request. The method can sort the obtained multiple different access information so that there will be no conflict between all corresponding request instruction sets, and also so that there will be no conflict between the various instructions in the same request instruction set. The target device is enabled to feedback the correct target data, thus ensuring the success of the entire access process.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of device management and interaction, and in particular to an access method and electronic device. Background Art

[0002] When managing and accessing devices that access and control hardware, conflicts between access processes often occur. Summary of the invention

[0003] The present application embodiment provides an access method, including:

[0004] obtaining at least one access information for accessing a target device;

[0005] Sorting the processing order of the access information based on a preset sorting method;

[0006] Based on the processing sequence, obtaining a request instruction set corresponding to the access information currently being processed, and generating a first access request and a first acquisition request corresponding to the request instruction set, wherein the request instruction set is used to request to obtain target data from the target device;

[0007] The target data is acquired from the target device based at least on the first access request and the first acquisition request.

[0008] Optionally, the method further comprises:

[0009] Acquire information type of the access information;

[0010] In the case where it is determined that the information type is the first type, the corresponding access information is placed in a sorting queue.

[0011] Optionally, the step of sorting the processing order of the access information based on a preset sorting method includes:

[0012] Based on the acquisition time of the access information, the processing order of the access information is sorted by using the constructed layer structure;

[0013] The access information that has completed sorting is added to the constructed sorting queue.

[0014] Optionally, the request instruction set includes a setting request instruction and an obtaining request instruction, and obtaining a request instruction set corresponding to the access information currently being processed, and generating a first access request and a first obtaining request corresponding to the request instruction set, includes:

[0015] The acquisition request instruction is converted into a corresponding first access request and a first acquisition request by using an agent connected to the layer structure.

[0016] Optionally, the method further comprises:

[0017] The first access request, the first acquisition request, and the setting request instructions belonging to the same request instruction set are sorted in order of precedence, so as to interact with the target device based on the formed arrangement order.

[0018] Optionally, acquiring the target data from the target device based at least on the first access request and the first acquisition request includes:

[0019] Sending the first access request to the target device so that the target device determines corresponding target data;

[0020] After receiving the feedback from the target device, the first acquisition request is sent to the target device to acquire the target data.

[0021] Optionally, the layer structure is a HID Helper layer, a unified interface is provided in the HID Helper layer, the unified interface is used to receive the access information sent by at least one process, and the obtaining of at least one access information for accessing the target device includes: obtaining the access information through the unified interface.

[0022] Optionally, the target device is a HID device, and obtaining the target data from the target device is specifically:

[0023] Get some or all of the HID sub-device data from the HID device.

[0024] Optionally, when the target device is a HID device, the setting request instruction is a Set Report instruction, and the obtaining request instruction is a Get Report instruction.

[0025] An embodiment of the present application further provides an electronic device, including a memory and a processor, wherein the memory stores an executable program, and the processor processes the executable program to execute the method steps described above.

[0026] The access method of the embodiment of the present application can sort the multiple different access information obtained, thereby realizing the sorting of the corresponding request instruction sets, so that all request instruction sets will not conflict with each other, and each instruction in the same request instruction set will not conflict with each other. The target device processes each different instruction in sequence, so that the target device feeds back the correct target data, ensuring the success of the entire access process. BRIEF DESCRIPTION OF THE DRAWINGS

[0027] Figure 1A flowchart of an access method according to an embodiment of the present application;

[0028] Figure 2 A flowchart of a specific embodiment of the access method of the embodiment of the present application;

[0029] Figure 3 For the embodiments of this application Figure 1 A flowchart of an embodiment of step S200;

[0030] Figure 4 For the embodiments of this application Figure 1 A flowchart of an embodiment of step S400;

[0031] Figure 5 A flowchart of a specific embodiment of the access method of the embodiment of the present application;

[0032] Figure 6 A structural block diagram of an electronic device according to an embodiment of the present application;

[0033] Figure 7 A structural block diagram of another electronic device according to an embodiment of the present application; DETAILED DESCRIPTION

[0034] Various aspects and features of the present application are described herein with reference to the accompanying drawings.

[0035] It should be understood that various modifications may be made to the embodiments of the present application. Therefore, the above description should not be considered as limiting, but only as an example of an embodiment. Other modifications within the scope and spirit of the present application will occur to those skilled in the art.

[0036] The accompanying drawings, which are incorporated in and constitute a part of the specification, illustrate embodiments of the present application and, together with the general description of the present application given above and the detailed description of the embodiments given below, serve to explain the principles of the present application.

[0037] These and other characteristics of the present application will become apparent from the following description of a preferred form of embodiment given as a non-limiting example with reference to the accompanying drawings.

[0038] It should also be understood that although the present application has been described with reference to some specific examples, those skilled in the art will be able to readily implement many other equivalent forms of the present application.

[0039] The above and other aspects, features and advantages of the present application will become more apparent in view of the following detailed description when taken in conjunction with the accompanying drawings.

[0040] Specific embodiments of the present application are described hereinafter with reference to the accompanying drawings; however, it should be understood that the embodiments applied for are merely examples of the present application, which may be implemented in a variety of ways. Well-known and / or repeated functions and structures are not described in detail to avoid unnecessary or redundant details that obscure the present application. Therefore, the specific structural and functional details applied for herein are not intended to be limiting, but rather to teach those skilled in the art to use the present application in a variety of ways with substantially any suitable detailed structure.

[0041] This specification may use the phrases "in one embodiment," "in another embodiment," "in yet another embodiment," or "in other embodiments," all of which may refer to one or more of the same or different embodiments according to the present application.

[0042] An access method in an embodiment of the present application can be applied to the process of an electronic device accessing a HID device associated therewith, wherein the HID device can be a USB-based HID device, USB-HID is the abbreviation of Universal Serial Bus-Human Interface Device, and the HID device is a device that can interact with a person, such as a keyboard, a mouse, and a joystick. The method can control the access process during the process of the electronic device's main body accessing a target device such as a HID device.

[0043] Figure 1 Flow chart of the access method of the embodiment of the present application, such as Figure 1 Shown and combined Figure 4 , the method is described in detail, and the method comprises the following steps:

[0044] S100: Acquire at least one access information for accessing a target device.

[0045] Exemplarily, the target device is a device associated with the electronic device, such as the HID device connected to the body of the electronic device mentioned above. The target device is the target of access, such as the target accessed by the body of the electronic device is the HID device. The access information includes relevant information for accessing the target device, and may include information such as the specific target, access time, and access content. The access information may be of various types, and different access information may have different purposes for accessing the target device. For example, multiple different threads generated by the electronic device all access the target device, but the access information corresponding to different threads is not the same.

[0046] In this embodiment, when acquiring access information, the electronic device can acquire all access information through a pre-built unified interface, so that the acquired access information can be processed uniformly.

[0047] S200, sorting the processing order of the access information based on a preset sorting method.

[0048] Exemplarily, the preset sorting method can be constructed according to actual needs, such as according to the time when the access information is obtained, according to the priority corresponding to the access information, or according to the identifier of the target device corresponding to the access information.

[0049] The access information is sorted based on a preset sorting method. For example, the access information obtained can be arranged into a queue, and then the access information is processed according to the order in the queue, and the first access information obtained is processed first, and the access information obtained later is processed later. Processing the access information in the arranged order can avoid the accident of processing conflicts between different access information.

[0050] For example, if two different threads both send access information to the first target device, if the access information corresponding to the two threads are sorted (the corresponding request instruction sets are also sorted), the request instruction sets corresponding to their respective access information can be processed one by one according to the logical order formed after sorting, thereby avoiding processing conflicts and information confusion.

[0051] S300, based on the processing order, obtain a request instruction set corresponding to the access information currently being processed, and generate a first access request and a first acquisition request corresponding to the request instruction set, wherein the request instruction set is used to request to obtain target data from the target device.

[0052] Exemplarily, after the processing order of the access information is sorted, a corresponding processing order is formed, and the electronic device can process the access information according to the processing order. The access information corresponds to a request instruction set, and the request instruction set is used to request to obtain target data from the target device. For example, the first access information includes multiple different request instructions (all request instructions can be used as a request instruction set), thereby requesting to obtain multiple different feedback information of the target device.

[0053] In one embodiment, the request instruction set includes multiple types of request instructions, such as a get request instruction and a set request instruction. For example, the get request instruction is a Get Report instruction, and the set request instruction is a SetReport instruction. The Get Report instruction is used to obtain information, and the Set Report instruction is used to set the target device. The Get Report instruction can be converted into a corresponding first access request and a first get request, such as a Set Feature instruction and a Get Feature instruction, to form a first access request and a first get request corresponding to the request instruction set.

[0054] S400: Acquire the target data from the target device based at least on the first access request and the first acquisition request.

[0055] Exemplarily, the acquisition request instruction in the same request instruction set corresponds to a first access request (such as the Set feature instruction described above) and a first acquisition request (such as the Get Feature instruction described above). The first access request and the first acquisition request have a relative logical processing order, and the first access request can be sent to the target device first, so that the target device determines the corresponding target data according to the first access request, and then the first acquisition request can be sent to the target device, so that the target device can send the target data to the requesting party according to the first acquisition request, such as to the main body of the electronic device, thereby ensuring that there will be no loopholes in the processing of the acquisition request instruction and the instructions associated with it, such as the phenomenon that the acquisition request instruction in the request instruction set is never executed.

[0056] Furthermore, the target device may be accessed based on the logical order of the first access request, the first acquisition request, and other instructions in the request instruction set corresponding to the same request instruction set. For example, the target device may be accessed based on the first access request, the first acquisition request, and the set request instruction in the request instruction set. For example, the target device may be accessed in the following order: the first access request (such as the Set feature instruction described above), the first acquisition request (such as the Get Feature instruction described above), and the set request instruction (such as the Set Report instruction described above). This prevents conflicts between the various instructions in the same request instruction set.

[0057] Since different request instruction sets also have a processing order, all instructions will not conflict. The target device processes each different instruction in sequence, so that the target device can feedback correct target data, such as buffer data.

[0058] The access method implemented in the present application can sort the multiple different access information obtained, thereby realizing the sorting of the corresponding request instruction sets, so that all request instruction sets will not conflict with each other, and also so that the instructions in the same request instruction set will not conflict with each other. The target device processes each different instruction in turn, so that the target device feeds back the correct target data, ensuring the success of the entire access process.

[0059] In one embodiment of the present application, Figure 2 As shown, the method further comprises the following steps:

[0060] S500: Acquire the information type of the access information.

[0061] Exemplarily, the access information has multiple different types, such as input report type, output report type and feature report type. The type of the acquired access information can be determined by its identifier or by its data structure.

[0062] For different information types, a processing method that is suitable for them can be adopted.

[0063] S600: When it is determined that the information type is the first type, the corresponding access information is placed in a sorting queue.

[0064] Exemplary, combined Figure 4 The first type may be a feature report type, and the access information of the feature report type is placed in a sorting queue. Thus, the access information of the feature report type may be processed according to the order formed in the sorting queue (such as the first sorting queue).

[0065] Of course, the first type may also be other types of access information, and other types of access information may be processed in other ways. For example, it may be processed in a manner similar to that of processing feature report type access information, such as using the second sorting queue to place input report type access information, and then uniformly processing the access information in the second sorting queue; using the third sorting queue to place output report type access information, and then uniformly processing the access information in the third sorting queue.

[0066] Of course, a completely different access information processing method from that for feature report type can also be used, which is not limited here. In this way, for the same type of access information arranged in the same sorting queue, the processing efficiency can be effectively improved during the specific processing.

[0067] In one embodiment of the present application, the processing order of the access information is sorted based on a preset sorting method, such as Figure 3 As shown, including:

[0068] S210, based on the acquisition time of the access information, the processing order of the access information is sorted by using the constructed layer structure.

[0069] S220: Add the sorted access information to the constructed sorting queue.

[0070] Exemplarily, the layer structure is a virtual structure, which can be set between the requester and the target device, such as between a thread / process and an HDI device. The relatively independent hierarchical structure can uniformly and orderly receive access information sent by multiple different requesters, and then sort the received access information. This includes sorting the access information according to the acquisition time of the access information obtained by the layer structure. For example, the access information obtained first is added to the front of the sorting queue, and the access information obtained later is added to the back of the sorting queue. Thus, the sorting of the entire access information is gradually realized.

[0071] When processing the access information in the sorting queue, the access information is obtained from the head of the sorting queue as the current processing access information, and then all the access information is processed step by step and in an orderly manner.

[0072] In one embodiment of the present application, the request instruction set includes a setting request instruction and an acquisition request instruction, and the acquiring the request instruction set corresponding to the access information currently being processed, and generating a first access request and a first acquisition request corresponding to the request instruction set, includes:

[0073] The acquisition request instruction is converted into a corresponding first access request and a first acquisition request by using an agent connected to the layer structure.

[0074] Exemplarily, the request instruction set may include multiple request instructions. In this embodiment, it is clarified that the request instruction set includes a set request instruction and a get request instruction. When the target device is a HID device, the set request instruction may be a Set Report instruction, and the get request instruction may be a Get Report instruction. The Get Report instruction is used to obtain information, and the Set Report instruction is used to set the target device.

[0075] The above-mentioned layer structure is connected with an agent, which can be set between the layer structure and the target device. After the layer structure determines the corresponding request instruction set according to the access information, the agent can receive the request instruction set from the layer structure, and then sort the setting request instructions and obtaining request instructions in the request instruction set, and then convert the obtaining request instructions into the corresponding first access request and first obtaining request.

[0076] In one embodiment of the present application, the method further includes the following steps: arranging the first access request, the first acquisition request and the setting request instructions belonging to the same request instruction set in a chronological order so as to interact with the target device based on the formed arrangement order.

[0077] Exemplarily, the first access request, the first acquisition request, and the setting request instruction in the same request instruction set are sequenced so that no conflict occurs between the first access request, the first acquisition request, and the setting request instruction.

[0078] For example, combined with Figure 5 , sort the instructions in the first request instruction set, put the Get Report instruction in the first place, and put the Set Report instruction in the second place. So the Get Report instruction is processed first. It is converted into the Set Feature instruction and the Get Feature instruction, so that the Set Feature instruction can be sent to the target device first, and then the Get Feature instruction can be sent to the target device after receiving feedback. Then the Set Report instruction is sent to the target device. So the conflict between the instructions is avoided.

[0079] In one embodiment of the present application, the target data is obtained from the target device based at least on the first access request and the first acquisition request, such as Figure 4 As shown, the following steps are included:

[0080] S410, sending the first access request to the target device, so that the target device determines corresponding target data;

[0081] S420: After receiving feedback from the target device, send the first acquisition request to the target device to acquire the target data.

[0082] Exemplarily, the first access request is used by the requesting party to request the target device to determine the required target data, such as determining the relevant data of the sub-device in the target device. After determining the relevant data, the target device feeds back to the requesting party. The requesting party then asks the target device for the relevant data of the sub-device through the first acquisition request. The target device feeds back the target data to the requesting party according to the first acquisition request. Thus, the entire request process is logical and does not cause confusion.

[0083] For example, in a specific embodiment, the computer motherboard sends a Set feature command to the HID keyboard to request the data of the light set on it, wherein the Set feature command may include target data such as the position information, quantity information, and light state of the light, and the HID keyboard determines the target data to be fed back according to the Set feature command. The computer motherboard then sends a Get Feature command to the HID keyboard, and the HID keyboard feeds back the target data about the light to the motherboard according to the Get Feature command. Then the motherboard sends a Set Report command to the HID keyboard, so that the state of the light can be set.

[0084] In one embodiment of the present application, the layer structure is a HID Helper layer, a unified interface is set in the HID Helper layer, the unified interface is used to receive the access information sent by at least one process, and the obtaining of at least one access information for accessing the target device includes: obtaining the access information through the unified interface.

[0085] Exemplarily, the HID Helper layer can be set between the thread / process and the HID device, such as being connected to the target device through an intelligent agent (HID Agent). A unified interface is set in the HID Helper layer for receiving access information sent by one or more processes. After receiving the access information, the HID Helper layer converts it into a corresponding request instruction set, sends the request instruction set to the HID Agent, and the HID Agent sorts the setting request instruction and the acquisition request instruction in the request instruction set into a sorting queue, and then converts the acquisition request instruction therein into the corresponding first access request and first acquisition request. Then interact with the target device based on the instructions in the sorting queue.

[0086] In one embodiment of the present application, the target device is a HID device, and obtaining the target data from the target device is specifically: obtaining part or all of the data of the HID sub-device from the HID device.

[0087] For example, the HID device is a USB HID keyboard, and the target data obtained from the USB HID keyboard may be data related to some or all of the lights on the USB HID keyboard, such as information on the flashing state of the lights.

[0088] The present application also provides an electronic device, such as Figure 6 As shown, including:

[0089] The acquisition module is configured to acquire at least one access information for accessing the target device.

[0090] Exemplarily, the target device is a device associated with the electronic device, such as the HID device connected to the body of the electronic device mentioned above. The target device is the target of access, such as the target accessed by the body of the electronic device is the HID device. The access information includes relevant information for accessing the target device, and may include information such as the specific target, access time, and access content. The access information may be of various types, and different access information may have different purposes for accessing the target device. For example, multiple different threads generated by the electronic device all access the target device, but the access information corresponding to different threads is not the same.

[0091] In this embodiment, when acquiring access information, the acquisition module may acquire all access information through a pre-built unified interface, so that the acquired access information can be processed uniformly.

[0092] The sorting module is configured to sort the processing order of the access information based on a preset sorting method.

[0093] Exemplarily, the preset sorting method can be constructed according to actual needs, such as according to the time when the access information is obtained, according to the priority corresponding to the access information, or according to the identifier of the target device corresponding to the access information.

[0094] The sorting module sorts the access information based on a preset sorting method, for example, the access information obtained can be arranged into a queue, and then the access information is processed according to the order in the queue, and the first access information obtained is processed first, and the access information obtained later is processed later. Processing the access information in the arranged order can avoid the accident of processing conflicts between different access information.

[0095] For example, two different threads both send access information to the first target device. If the sorting module sorts the access information corresponding to the two threads respectively (also sorts the corresponding request instruction sets), the request instruction sets corresponding to their respective access information can be processed one by one according to the logical order formed after sorting, thereby avoiding processing conflicts and information confusion.

[0096] a processing module configured to obtain, based on the processing sequence, a request instruction set corresponding to the access information currently being processed, and generate a first access request and a first acquisition request corresponding to the request instruction set, wherein the request instruction set is used to request to acquire target data from the target device;

[0097] The target data is acquired from the target device based at least on the first access request and the first acquisition request.

[0098] Exemplarily, after the sorting module sorts the processing order of the access information, a corresponding processing order is formed, and the processing module can process the access information according to the processing order. The access information corresponds to a request instruction set, and the request instruction set is used to request to obtain target data from the target device. For example, the first access information includes multiple different request instructions (all request instructions can be used as a request instruction set), thereby requesting to obtain multiple different feedback information of the target device.

[0099] In one embodiment, the request instruction set includes multiple types of request instructions, such as a get request instruction and a set request instruction. For example, the get request instruction is a Get Report instruction, and the set request instruction is a SetReport instruction. The Get Report instruction is used to obtain information, and the Set Report instruction is used to set the target device. The processing module can convert the Get Report instruction into a corresponding first access request and a first get request, such as a SetFeature instruction and a Get Feature instruction, thereby forming a first access request and a first get request corresponding to the request instruction set.

[0100] Exemplarily, the acquisition request instruction in the same request instruction set corresponds to a first access request (such as the Set feature instruction mentioned above) and a first acquisition request (such as the Get Feature instruction mentioned above). The first access request and the first acquisition request have a relative logical processing order, and the processing module can first send the first access request to the target device, so that the target device determines the corresponding target data according to the first access request, and then send the first acquisition request to the target device, so that the target device can send the target data to the requesting party according to the first acquisition request, such as to the main body of the electronic device, thereby ensuring that there will be no loopholes in the processing of the acquisition request instruction and the instructions associated with it, such as the phenomenon that the acquisition request instruction in the request instruction set is never executed.

[0101] Furthermore, the processing module can access the target device based on the logical order between the first access request, the first acquisition request, and other instructions in the request instruction set corresponding to the same request instruction set. For example, the target device is accessed based on the first access request, the first acquisition request, and the setting request instruction in the request instruction set. For example, the target device is accessed in the following order: the first access request (such as the Set feature instruction mentioned above), the first acquisition request (such as the GetFeature instruction mentioned above), and the setting request instruction (such as the Set Report instruction mentioned above). This prevents conflicts between the various instructions in the same request instruction set.

[0102] In one embodiment of the present application, the sorting module is further configured to:

[0103] Acquire information type of the access information;

[0104] In the case where it is determined that the information type is the first type, the corresponding access information is placed in a sorting queue.

[0105] In one embodiment of the present application, the sorting module is further configured to:

[0106] Based on the acquisition time of the access information, the processing order of the access information is sorted by using the constructed layer structure;

[0107] The access information that has completed sorting is added to the constructed sorting queue.

[0108] In one embodiment of the present application, the request instruction set includes a set request instruction and a get request instruction, and the processing module is further configured to:

[0109] The acquisition request instruction is converted into a corresponding first access request and a first acquisition request by using an agent connected to the layer structure.

[0110] In one embodiment of the present application, the sorting module is further configured to:

[0111] The first access request, the first acquisition request, and the setting request instructions belonging to the same request instruction set are sorted in order of precedence, so as to interact with the target device based on the formed arrangement order.

[0112] In one embodiment of the present application, the processing module is further configured to:

[0113] Sending the first access request to the target device so that the target device determines corresponding target data;

[0114] After receiving the feedback from the target device, the first acquisition request is sent to the target device to acquire the target data.

[0115] In one embodiment of the present application, the layer structure is a HID Helper layer, a unified interface is provided in the HID Helper layer, the unified interface is used to receive the access information sent by one or more processes, and the acquisition module is further configured as follows:

[0116] The access information is obtained through the unified interface.

[0117] In one embodiment of the present application, the target device is a HID device, and the processing module is further configured to:

[0118] Get some or all of the HID sub-device data from the HID device.

[0119] In one embodiment of the present application, when the target device is a HID device, the setting request instruction is a Set Report instruction, and the obtaining request instruction is a Get Report instruction.

[0120] The present application also provides an electronic device, such as Figure 7 As shown, it includes a memory and a processor, the memory stores an executable program, and the processor processes the executable program to execute the various steps of the access method as described above.

[0121] The above embodiments are only exemplary embodiments of the present application and are not intended to limit the present application. The protection scope of the present application is defined by the claims. Those skilled in the art may make various modifications or equivalent substitutions to the present application within the essence and protection scope of the present application, and such modifications or equivalent substitutions shall also be deemed to fall within the protection scope of the present application.

Claims

1. An access method, comprising: Acquire at least one access information for accessing the target device, wherein when multiple different threads or processes of the same electronic device access the target device, the corresponding access information is different; Sorting the processing order of the access information based on a preset sorting method; Based on the processing sequence, obtaining a request instruction set corresponding to the access information currently being processed, and generating a first access request and a first acquisition request corresponding to the request instruction set, wherein the request instruction set is used to request to obtain target data from the target device; At least based on the first access request and the first acquisition request, the target data is acquired from the target device; wherein, The target device is a HID device, and obtaining the target data from the target device specifically includes: obtaining part or all of the data of the HID sub-device from the HID device.

2. The method according to claim 1, further comprising: Acquire information type of the access information; In the case where it is determined that the information type is the first type, the corresponding access information is placed in a sorting queue.

3. The method according to claim 1, wherein the step of sorting the processing order of the access information based on a preset sorting method comprises: Based on the acquisition time of the access information, the processing order of the access information is sorted by using the constructed layer structure; The access information that has completed sorting is added to the constructed sorting queue.

4. The method according to claim 3, wherein the request instruction set comprises a set request instruction and an obtain request instruction, and the obtaining the request instruction set corresponding to the access information currently being processed, and generating a first access request and a first obtain request corresponding to the request instruction set, comprises: The acquisition request instruction is converted into a corresponding first access request and a first acquisition request by using an agent connected to the layer structure.

5. The method according to claim 4, further comprising: The first access request, the first acquisition request, and the setting request instructions belonging to the same request instruction set are sorted in order of precedence, so as to interact with the target device based on the formed arrangement order.

6. The method according to claim 1, wherein obtaining the target data from the target device based at least on the first access request and the first acquisition request comprises: Sending the first access request to the target device so that the target device determines corresponding target data; After receiving the feedback from the target device, the first acquisition request is sent to the target device to acquire the target data.

7. The method according to claim 3, wherein the layer structure is a HID Helper layer, a unified interface is provided in the HID Helper layer, the unified interface is used to receive the access information sent by at least one process, and the obtaining of at least one access information for accessing the target device comprises: The access information is obtained through the unified interface. 8 . The method according to claim 4 , wherein when the target device is a HID device, the setting request instruction is a Set Report instruction, and the obtaining request instruction is a Get Report instruction.

9. An electronic device, comprising a memory and a processor, wherein the memory stores an executable program, and the processor processes the executable program to execute the method steps as claimed in any one of claims 1 to 8.