Product control method and device, computer equipment and storage medium

By adopting the assembly and translation technology of a unified command set and protocol layer processing center in embedded products, the problems of development complexity and low control efficiency caused by the use of different command sets of different products are solved, and unified control and efficient management of multiple products are achieved.

CN120111084APending Publication Date: 2025-06-06SHENZHEN 3NOD DIGITAL TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202311674109.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-12-06
Publication Date
2025-06-06

AI Technical Summary

Technical Problem

The development of existing embedded products has different command sets because different products use different command sets, which increases the learning cost and complexity of product control, thereby reducing product control efficiency.

Method used

Using a unified command set, the product control instructions are assembled and translated through the protocol layer processing center to generate instruction data packets suitable for the target product, and send instruction data packets to the target product's protocol interface through the protocol layer interface to achieve unified control of multiple products.

Benefits of technology

It reduces learning and development costs, simplifies product control processes, improves product control efficiency and compatibility, and enables control of multiple different products at the same time.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120111084A_ABST
    Figure CN120111084A_ABST
Patent Text Reader

Abstract

The embodiment of the invention belongs to the technical field of communication, and relates to a product control method, which comprises the following steps: receiving a product control instruction for a target product triggered based on a unified command set through an application, the unified command set being simultaneously applied to various products; according to the target product, assembling the product control instruction in a protocol layer processing center to obtain an instruction data packet; and sending the instruction data packet to a protocol layer interface corresponding to the target product, and sending the instruction data packet to a protocol interface corresponding to the target product through the protocol layer interface, so that the target product responds to the product control instruction according to the instruction data packet, a protocol interface is registered based on an SDK of a product. The invention further provides a product control device, computer equipment and a storage medium. The product control efficiency is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of communication technology, and in particular to a product control method, device, computer equipment and storage medium. Background Art

[0002] There are many types of embedded products. Different embedded products use different command sets. Different command sets may have different functions (such as OTA upgrades, data transparent transmission, etc.). Different command sets may also rely on different transmission media. For example, wired transmission media include USB, I2C, SPI, UART, etc., and wireless transmission media include Bluetooth, WiFi, etc.

[0003] At present, the development of embedded programs is based on the command set provided by the original SDK (Software Development Kit) of the embedded product. Since different embedded products use different command sets, developers need to learn different command sets of different products, which increases the learning cost; at the same time, it is difficult for the host computer to be compatible with different products, resulting in errors in product control, all of which make the product control efficiency low. Summary of the invention

[0004] The purpose of the embodiments of the present application is to provide a product control method, device, computer equipment and storage medium to solve the problem of low product control efficiency.

[0005] In order to solve the above technical problems, the present application provides a product control method, which adopts the following technical solution:

[0006] Receiving, through an application, a product control instruction for a target product triggered based on a unified command set, wherein the unified command set is applied to multiple products at the same time;

[0007] According to the target product, assembling the product control instructions in the protocol layer processing center to obtain an instruction data packet;

[0008] The instruction data packet is sent to a protocol layer interface corresponding to the target product, and the instruction data packet is sent to a protocol interface corresponding to the target product through the protocol layer interface, so that the target product responds to the product control instruction according to the instruction data packet, wherein the protocol interface is based on the SDK registration of the product.

[0009] Furthermore, the step of assembling the product control instructions in the protocol layer processing center to obtain an instruction data packet according to the target product includes:

[0010] Obtaining a protocol layer specification stored in the protocol layer processing center;

[0011] According to the protocol layer specification, the product control instructions are assembled into instructions suitable for the target product to obtain an instruction data packet.

[0012] Furthermore, before the step of sending the instruction data packet to the protocol interface corresponding to the target product through the protocol layer interface, the method further includes:

[0013] Obtain a callback function of the target product;

[0014] The callback function is registered to the SDK of the target product to obtain the protocol interface of the target product, where the protocol interface is used to communicate with the bottom layer of the target product.

[0015] Further, the step of responding to the product control instruction according to the instruction data packet by the target product includes:

[0016] Acquire, through a protocol interface, first data generated by the target product according to the instruction data packet;

[0017] Acquire the first data through the protocol layer interface, and generate a first data packet according to the first data;

[0018] Sending the first data packet to the protocol layer processing center through the protocol layer interface;

[0019] The valid data in the first data packet is sent to the application corresponding to the target product through the protocol layer processing center.

[0020] Furthermore, the step of sending the valid data in the first data packet to the application corresponding to the target product through the protocol layer processing center includes:

[0021] Splitting the first data packet into a packet header and valid data by the protocol layer processing center;

[0022] The protocol layer processing center saves the packet header and sends the valid data to the application corresponding to the target product.

[0023] Furthermore, after the step of sending the valid data in the first data packet to the application corresponding to the target product through the protocol layer processing center, the method further includes:

[0024] Processing the valid data through the application, and generating second valid data in response to the valid data according to the unified command set;

[0025] Acquire the second valid data through the protocol layer processing center, and generate a second data packet according to the second valid data and the packet header;

[0026] The second data packet is sent to the target product through the protocol layer interface.

[0027] In order to solve the above technical problems, the embodiment of the present application further provides a product control device, which adopts the following technical solution:

[0028] An instruction receiving module, used for receiving, through an application, a product control instruction for a target product triggered based on a unified command set, wherein the unified command set is applied to multiple products at the same time;

[0029] An instruction assembly module, used for assembling the product control instructions in the protocol layer processing center according to the target product to obtain an instruction data packet;

[0030] A data packet sending module is used to send the instruction data packet to the protocol layer interface corresponding to the target product, and send the instruction data packet to the protocol interface corresponding to the target product through the protocol layer interface, so that the target product responds to the product control instruction according to the instruction data packet, wherein the protocol interface is based on the SDK registration of the product.

[0031] Furthermore, the data packet sending module includes:

[0032] A first acquisition submodule, used for acquiring first data generated by the target product according to the instruction data packet through a protocol interface;

[0033] A first generating submodule, used for acquiring the first data through the protocol layer interface, and generating a first data packet according to the first data;

[0034] A data packet sending submodule, used for sending the first data packet to the protocol layer processing center through the protocol layer interface;

[0035] The valid sending submodule is used to send the valid data in the first data packet to the application corresponding to the target product through the protocol layer processing center.

[0036] In order to solve the above technical problems, an embodiment of the present application also provides a computer device, which includes a memory and a processor, wherein the memory stores computer-readable instructions, and when the processor executes the computer-readable instructions, the steps of the product control method described above are implemented.

[0037] In order to solve the above technical problems, an embodiment of the present application further provides a computer-readable storage medium, on which computer-readable instructions are stored. When the computer-readable instructions are executed by a processor, the steps of the product control method described above are implemented.

[0038] Compared with the prior art, the embodiments of the present application mainly have the following beneficial effects: a unified command set is set at the application layer and is applied to multiple embedded products at the same time, and multiple different products are controlled at the same time through the unified command set; product control instructions for target products triggered based on the unified command set are received through the application; a protocol layer processing center is set to realize the conversion and translation between the underlying command set of the product and the upper unified command set, and the product control instructions are translated and assembled according to the target product in the protocol layer processing center to obtain an instruction data packet suitable for the target product; the instruction data packet is sent to the protocol layer interface corresponding to the target product, and the protocol layer interface is an interface between the protocol layer and the underlying protocol interface, which can send the instruction data packet to the protocol interface corresponding to the target product, and the protocol interface is based on the SDK registration of the product, and can communicate with the underlying target product, so that the target product responds to the product control instruction according to the instruction data packet; the present application provides a unified interface for users at the application layer, completes the translation and packaging of instructions at the protocol layer, and only one set of unified command sets is needed to control various embedded products, which reduces the difficulty of product control and improves the efficiency of product control. BRIEF DESCRIPTION OF THE DRAWINGS

[0039] In order to more clearly illustrate the scheme in the present application, a brief introduction is given below to the drawings required for use in the description of the embodiments of the present application. Obviously, the drawings described below are some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0040] Figure 1 is a flow chart of an embodiment of a product control method according to the present application;

[0041] Figure 2 is a schematic diagram of a unified command set software framework according to the present application;

[0042] Figure 3 is a structural schematic diagram of an embodiment of a product control device according to the present application;

[0043] Figure 4 It is a structural diagram of an embodiment of a computer device according to the present application. DETAILED DESCRIPTION

[0044] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by technicians in the technical field of the present application; the terms used in the specification of the application herein are only for the purpose of describing specific embodiments and are not intended to limit the present application; the terms "including" and "having" and any variations thereof in the specification and claims of the present application and the above-mentioned drawings are intended to cover non-exclusive inclusions. The terms "first", "second", etc. in the specification and claims of the present application or the above-mentioned drawings are used to distinguish different objects, not to describe a specific order.

[0045] Reference to "embodiments" herein means that a particular feature, structure, or characteristic described in conjunction with the embodiments may be included in at least one embodiment of the present application. The appearance of the phrase in various locations in the specification does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment that is mutually exclusive with other embodiments. It is explicitly and implicitly understood by those skilled in the art that the embodiments described herein may be combined with other embodiments.

[0046] In order to enable those skilled in the art to better understand the solution of the present application, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the accompanying drawings.

[0047] like Figure 1 FIG. 1 is a flowchart of an embodiment of a product control method according to the present application. The product control method comprises the following steps:

[0048] Step S101: receiving, through an application, a product control instruction for a target product triggered by a unified command set, wherein the unified command set is applied to a plurality of products at the same time.

[0049] Specifically, this application writes and configures a unified command set for various embedded products. When users operate products at the application level, the interface exposed to users is the same, and the command set required to control various products is the same. For users, they only need to learn one set of command sets to control all connected products, reducing communication and learning costs.

[0050] Each embedded product has an application. Users can access the application and trigger product control instructions for the target product based on a unified command set.

[0051] Step S102: According to the target product, the product control instructions are assembled in the protocol layer processing center to obtain an instruction data packet.

[0052] Specifically, Figure 2As shown, the unified command set software framework of each embedded product in this application includes three layers, from top to bottom: application layer, protocol layer and platform layer. Among them, the application layer is associated with the application scenario. This application sets up a variety of application scenarios, such as UX control (User Experience), sensor control (sensor), low power management, production line testing, data transmission, OTA upgrade and power supply (power), etc. Among them, UX can include BT UX, audio UX and sensor UX. Sensors can include pressure, light and touch.

[0053] The protocol layer includes a protocol layer processing center (commu_core) and multiple protocol layer interfaces (commu_xx). The protocol layer processing center is the core processing center for realizing the unification of command sets. It is also equivalent to a logistics center, which determines the flow of data between interfaces and applications corresponding to different products. Each protocol layer interface corresponds to an embedded product, for example, it may include commu_hid, commu_BT, commu_BLE, commu_Uart, commu_I2C, commu_Other. In addition, each protocol layer interface corresponds to an adapter Adapter, for example, the above-mentioned protocol layer interfaces correspond to hid_Adapter, BT_Adapter, BLE_Adapter, Uart_Adapter, I2C_Adapter, Other_Adapter respectively.

[0054] The platform layer connects to embedded products, that is, the underlying hardware resources. Different embedded products use different SDKs, that is, different embedded products use different processing methods, and the encapsulated functions and parameters do not meet unified requirements. The platform layer can include the driver layer, library, operating system kernel and hardware abstraction layer (HAL). Among them, the driver layer can include BT, BLE, audio, FLASH, USB, I2C, Uart and other drivers. The library (LIB) contains third-party libraries and platform libraries. The operating system kernel includes threads, timing, memory, data transmission and other service kernels. The hardware abstraction layer can include CMU, FLASH, CTL, DMA, IIC, Uart, GPIO, SPI, I2S, PWM, USB, etc.

[0055] The product control instructions received by the protocol layer processing center from the application are themselves general product control instructions, and the associated object identifier indicates the embedded product associated with the product control instruction. When there is no associated object identifier, the product control instruction can act on any embedded product that has been connected to the product control system.

[0056] The protocol layer processing center can assemble product control instructions based on the target product to obtain an instruction data packet for the target product.

[0057] Furthermore, the above step S102 may include: acquiring a protocol layer specification stored in a protocol layer processing center; and assembling the product control instructions suitable for the target product according to the protocol layer specification to obtain an instruction data packet.

[0058] Specifically, the protocol layer processing center pre-stores the protocol layer specification, which is a unified command set and each product SDK command set for definition, as well as the standard for conversion between them. According to the protocol layer specification, the instructions from the application layer can be translated into instructions that can be understood by the bottom layer, and the instructions or data from the bottom layer can also be translated into unified and easy-to-understand application layer instructions or data.

[0059] According to the protocol layer specification, the product control instructions can be assembled into instructions suitable for the target product to obtain an instruction data packet that can be directly understood by the underlying target product.

[0060] In this embodiment, the protocol layer specification stored in the protocol layer processing center is obtained, and the product control instructions are translated and reassembled according to the protocol layer specification to obtain an instruction data packet suitable for the target product, ensuring that the underlying target product can understand the instructions from the application layer.

[0061] Step S103, sending the instruction data packet to the protocol layer interface corresponding to the target product, and sending the instruction data packet to the protocol interface corresponding to the target product through the protocol layer interface, so that the target product responds to the product control instruction according to the instruction data packet, wherein the protocol interface is based on the SDK registration of the product.

[0062] Specifically, the protocol layer processing center sends the instruction data packet to the protocol layer interface corresponding to the target product, and the protocol layer interface sends the instruction data packet to the protocol interface corresponding to the target product. The protocol interface is registered based on the software development kit SDK of the embedded product and can directly interact with the product. The target product can obtain the instruction data packet through the protocol interface and respond to the instruction in the instruction data packet.

[0063] Furthermore, before the above-mentioned step of sending the instruction data packet to the protocol interface corresponding to the target product through the protocol layer interface, it can also include: obtaining the callback function of the target product; registering the callback function to the SDK of the target product to obtain the protocol interface of the target product, and the protocol interface is used to communicate with the underlying layer of the target product.

[0064] Specifically, the callback function of the target product is obtained in advance. The callback function refers to a function that is called when a specific event occurs. Then the callback function is registered with the SDK of the target product to obtain the protocol interface of the target product so that when the underlying data of the target product arrives or is generated, the upper protocol layer and application layer can be notified. When there are multiple products, each product needs to register the protocol interface separately.

[0065] In this embodiment, the callback function of the target product is obtained, and the callback function is registered with the SDK of the target product to obtain the protocol interface of the target product. The protocol interface realizes the communication between the protocol layer and the application layer and the bottom layer of the target product, thereby ensuring the realization of product control.

[0066] In this embodiment, a unified command set that is applied to multiple embedded products at the same time is set at the application layer, and multiple different products are controlled simultaneously through the unified command set; product control instructions for target products triggered based on the unified command set are received through the application; a protocol layer processing center is set to realize the conversion and translation between the underlying command set of the product and the upper unified command set, and the product control instructions are translated and assembled according to the target product at the protocol layer processing center to obtain an instruction data packet suitable for the target product; the instruction data packet is sent to the protocol layer interface corresponding to the target product, the protocol layer interface is an interface between the protocol layer and the underlying protocol interface, and it can send the instruction data packet to the protocol interface corresponding to the target product, the protocol interface is based on the SDK registration of the product, and can communicate with the underlying target product, so that the target product responds to the product control instruction according to the instruction data packet; this application provides a unified interface for users at the application layer, completes the translation and packaging of instructions at the protocol layer, and only one set of unified command sets is needed to control various embedded products, which reduces the difficulty of product control and improves the efficiency of product control.

[0067] Furthermore, the above-mentioned step of responding to the product control instruction according to the instruction data packet through the target product may include: obtaining the first data generated by the target product according to the instruction data packet through the protocol interface; obtaining the first data through the protocol layer interface, and generating a first data packet based on the first data; sending the first data packet to the protocol layer processing center through the protocol layer interface; sending the valid data in the first data packet to the application corresponding to the target product through the protocol layer processing center.

[0068] Specifically, the target product responds to the instruction data packet and generates first data. For example, the instruction data packet instructs the target product to perform an OTA upgrade, and the first data may be the current version information, upgrade progress, etc. of the target product.

[0069] The first data generated by the target product is obtained through the protocol interface, and the first data is sent to the protocol layer interface. The protocol layer interface commu_xx is an interface between the protocol layer processing center (commu_core) and the protocol interface, and plays the role of an intermediate layer for processing the callback function of the SDK, encapsulating the data sending and receiving method, and can generate a first data packet according to the first data, and pass the first data packet to the upper layer protocol layer processing center for processing.

[0070] The target product corresponding to the first data packet is identified through the protocol layer processing center, and the valid data in the first data packet is sent to the application corresponding to the target product.

[0071] Furthermore, the above-mentioned step of sending the valid data in the first data packet to the application corresponding to the target product through the protocol layer processing center may include: splitting the first data packet into a packet header and valid data through the protocol layer processing center; the protocol layer processing center saves the packet header and sends the valid data to the application corresponding to the target product.

[0072] Specifically, the first data packet consists of a header and valid data, where the header shows the source and destination of the data packet, and the valid data refers to the data that needs to be transmitted in this communication and has communication significance, such as the version information and upgrade progress mentioned above. The protocol layer processing center splits the first data packet into a header and valid data, saves the header, and sends the valid data to the application corresponding to the target product.

[0073] In this embodiment, after receiving the first data packet, the protocol layer processing center splits the first data packet into a packet header and valid data; the protocol layer processing center saves the packet header and sends the valid data to the application corresponding to the target product to realize the processing of the first data packet.

[0074] Furthermore, after the above-mentioned step of sending the valid data in the first data packet to the application corresponding to the target product through the protocol layer processing center, it can also include: processing the valid data through the application, and generating second valid data in response to the valid data according to a unified command set; acquiring the second valid data through the protocol layer processing center, and generating a second data packet based on the second valid data and the packet header; and sending the second data packet to the target product through the protocol layer interface.

[0075] Specifically, after receiving the valid data, the application processes the valid data, and the data processing result can be provided to the user, or the valid data can be directly provided to the user. The user can perform control operations or response operations on the processing result / valid data of the valid data based on the unified command set to generate second valid data.

[0076] The protocol layer processing center obtains the second valid data, obtains the pre-stored header according to the application, and generates a second data packet according to the second valid data and the header. The second data packet is sent to the target product through the protocol layer interface (the second data packet is first sent to the protocol layer interface corresponding to the target product through the protocol layer processing center, and then the second data packet is sent to the protocol interface corresponding to the target product through the protocol layer interface, and then the second data packet is sent to the target product through the callback function registered by the protocol interface).

[0077] In this embodiment, the valid data is processed by the application, and second valid data in response to the valid data is generated according to a unified command set; the second valid data is obtained through the protocol layer processing center, and a second data packet is generated according to the second valid data and a pre-stored packet header; the second data packet is sent to the target product through the protocol layer interface, thereby realizing the response process to the underlying layer after the application receives the underlying data.

[0078] In this embodiment, the target product generates first data according to the instruction data packet, and the protocol interface obtains the first data; the protocol layer interface then obtains the first data and generates a first data packet based on the first data; the protocol layer interface sends the first data packet to the protocol layer processing center; the valid data in the first data packet is sent to the application corresponding to the target product through the protocol layer processing center, thereby realizing the transmission of data from the bottom layer to the upper layer.

[0079] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiments can be implemented by instructing the relevant hardware through computer-readable instructions, and the computer-readable instructions can be stored in a computer-readable storage medium. When the program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, the aforementioned storage medium can be a non-volatile storage medium such as a disk, an optical disk, a read-only memory (ROM), or a random access memory (RAM).

[0080] It should be understood that, although the steps in the flowchart of the accompanying drawings are displayed in sequence as indicated by the arrows, these steps are not necessarily executed in sequence in the order indicated by the arrows. Unless otherwise specified herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least a part of the steps in the flowchart of the accompanying drawings may include multiple sub-steps or multiple stages, and these sub-steps or stages are not necessarily executed at the same time, but can be executed at different times, and their execution order is not necessarily sequential, but can be executed in turn or alternately with other steps or at least a part of the sub-steps or stages of other steps.

[0081] Further references Figure 3, as a response to the above Figure 1 In order to realize the method shown in the figure, the present application provides an embodiment of a product control device, and the device embodiment is Figure 1 Corresponding to the method embodiment shown, the device can be specifically applied to various electronic devices.

[0082] like Figure 3 As shown, the product control device 200 described in this embodiment includes: an instruction receiving module 201, an instruction assembling module 202 and a data packet sending module 203, wherein:

[0083] The instruction receiving module 201 is used to receive, through an application, product control instructions for a target product triggered based on a unified command set, where the unified command set is applied to multiple products at the same time.

[0084] The instruction assembly module 202 is used to assemble the product control instructions in the protocol layer processing center according to the target product to obtain an instruction data packet.

[0085] The data packet sending module 203 is used to send the instruction data packet to the protocol layer interface corresponding to the target product, and send the instruction data packet to the protocol interface corresponding to the target product through the protocol layer interface, so that the target product responds to the product control instruction according to the instruction data packet, wherein the protocol interface is based on the SDK registration of the product.

[0086] In this embodiment, a unified command set that is applied to multiple embedded products at the same time is set at the application layer, and multiple different products are controlled simultaneously through the unified command set; product control instructions for target products triggered based on the unified command set are received through the application; a protocol layer processing center is set to realize the conversion and translation between the underlying command set of the product and the upper unified command set, and the product control instructions are translated and assembled according to the target product at the protocol layer processing center to obtain an instruction data packet suitable for the target product; the instruction data packet is sent to the protocol layer interface corresponding to the target product, the protocol layer interface is an interface between the protocol layer and the underlying protocol interface, and it can send the instruction data packet to the protocol interface corresponding to the target product, the protocol interface is based on the SDK registration of the product, and can communicate with the underlying target product, so that the target product responds to the product control instruction according to the instruction data packet; this application provides a unified interface for users at the application layer, completes the translation and packaging of instructions at the protocol layer, and only one set of unified command sets is needed to control various embedded products, which reduces the difficulty of product control and improves the efficiency of product control.

[0087] In some optional implementations of this embodiment, the instruction assembly module 202 may include: a specification acquisition submodule and an instruction assembly submodule, wherein:

[0088] The specification acquisition submodule is used to obtain the protocol layer specifications stored in the protocol layer processing center.

[0089] The instruction assembly submodule is used to assemble the product control instructions suitable for the target product according to the protocol layer specification to obtain the instruction data packet.

[0090] In this embodiment, the protocol layer specification stored in the protocol layer processing center is obtained, and the product control instructions are translated and reassembled according to the protocol layer specification to obtain an instruction data packet suitable for the target product, ensuring that the underlying target product can understand the instructions from the application layer.

[0091] In some optional implementations of this embodiment, the product control device 200 may further include: a function acquisition module and a function registration module, wherein:

[0092] Function acquisition module, used to obtain the callback function of the target product.

[0093] The function registration module is used to register the callback function to the SDK of the target product and obtain the protocol interface of the target product. The protocol interface is used to communicate with the bottom layer of the target product.

[0094] In this embodiment, the callback function of the target product is obtained, and the callback function is registered with the SDK of the target product to obtain the protocol interface of the target product. The protocol interface realizes the communication between the protocol layer and the application layer and the bottom layer of the target product, thereby ensuring the realization of product control.

[0095] In some optional implementations of this embodiment, the data packet sending module 203 may include: a first acquisition submodule, a first generation submodule, a data packet sending submodule, and an effective sending submodule, wherein:

[0096] The first acquisition submodule is used to acquire first data generated by the target product according to the instruction data packet through the protocol interface.

[0097] The first generating submodule is used to obtain first data through a protocol layer interface and generate a first data packet according to the first data.

[0098] The data packet sending submodule is used to send the first data packet to the protocol layer processing center through the protocol layer interface.

[0099] The valid sending submodule is used to send the valid data in the first data packet to the application corresponding to the target product through the protocol layer processing center.

[0100] In this embodiment, the target product generates first data according to the instruction data packet, and the protocol interface obtains the first data; the protocol layer interface then obtains the first data and generates a first data packet based on the first data; the protocol layer interface sends the first data packet to the protocol layer processing center; the valid data in the first data packet is sent to the application corresponding to the target product through the protocol layer processing center, thereby realizing the transmission of data from the bottom layer to the upper layer.

[0101] In some optional implementations of this embodiment, the effective sending submodule may include: a data packet splitting unit and an effective sending unit, wherein:

[0102] The data packet splitting unit is used to split the first data packet into a packet header and valid data through a protocol layer processing center.

[0103] The effective sending unit is used for the protocol layer processing center to save the packet header and send the effective data to the application corresponding to the target product.

[0104] In this embodiment, after receiving the first data packet, the protocol layer processing center splits the first data packet into a packet header and valid data; the protocol layer processing center saves the packet header and sends the valid data to the application corresponding to the target product to realize the processing of the first data packet.

[0105] In some optional implementations of this embodiment, the data packet sending module 203 may further include: a second generating submodule, a data packet generating submodule, and a sending submodule, wherein:

[0106] The second generating submodule is used to process the valid data through an application, and generate second valid data in response to the valid data according to a unified command set.

[0107] The data packet generation submodule is used to obtain the second valid data through the protocol layer processing center, and generate a second data packet according to the second valid data and the packet header.

[0108] The sending submodule is used to send the second data packet to the target product through the protocol layer interface.

[0109] In this embodiment, the valid data is processed by the application, and second valid data in response to the valid data is generated according to a unified command set; the second valid data is obtained through the protocol layer processing center, and a second data packet is generated according to the second valid data and a pre-stored packet header; the second data packet is sent to the target product through the protocol layer interface, thereby realizing the response process to the underlying layer after the application receives the underlying data.

[0110] To solve the above technical problems, the present application also provides a computer device. Figure 4 , Figure 4 This is a basic structural block diagram of the computer device in this embodiment.

[0111] The computer device 3 includes a memory 31, a processor 32, and a network interface 33 that are interconnected through a system bus. It should be noted that the figure only shows a computer device 3 with components 31-33, but it should be understood that it is not required to implement all the components shown, and more or fewer components can be implemented instead. Among them, those skilled in the art can understand that the computer device here is a device that can automatically perform numerical calculations and / or information processing according to pre-set or stored instructions, and its hardware includes but is not limited to microprocessors, application specific integrated circuits (Application Specific Integrated Circuit, ASIC), programmable gate arrays (Field-Programmable Gate Array, FPGA), digital processors (Digital Signal Processor, DSP), embedded devices, etc.

[0112] The computer device may be a computing device such as a desktop computer, a notebook, a PDA, a cloud server, etc. The computer device may interact with a user through a keyboard, a mouse, a remote controller, a touch pad, or a voice control device.

[0113] The memory 31 includes at least one type of readable storage medium, and the readable storage medium includes flash memory, hard disk, multimedia card, card-type memory (for example, SD or DX memory, etc.), random access memory (RAM), static random access memory (SRAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), programmable read-only memory (PROM), magnetic memory, disk, optical disk, etc. In some embodiments, the memory 31 can be an internal storage unit of the computer device 3, such as a hard disk or memory of the computer device 3. In other embodiments, the memory 31 can also be an external storage device of the computer device 3, such as a plug-in hard disk equipped on the computer device 3, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (FlashCard), etc. Of course, the memory 31 can also include both the internal storage unit of the computer device 3 and its external storage device. In this embodiment, the memory 31 is generally used to store the operating system and various application software installed on the computer device 3, such as computer-readable instructions of the product control method, etc. In addition, the memory 31 can also be used to temporarily store various types of data that have been output or are to be output.

[0114] The processor 32 may be a central processing unit (CPU), a controller, a microcontroller, a microprocessor, or other data processing chip in some embodiments. The processor 32 is generally used to control the overall operation of the computer device 3. In this embodiment, the processor 32 is used to run computer-readable instructions stored in the memory 31 or process data, such as computer-readable instructions for running the product control method.

[0115] The network interface 33 may include a wireless network interface or a wired network interface. The network interface 33 is generally used to establish a communication connection between the computer device 3 and other electronic devices.

[0116] The computer device provided in this embodiment can execute the above product control method. Here, the product control method can be the product control method of each of the above embodiments.

[0117] In this embodiment, a unified command set that is applied to multiple embedded products at the same time is set at the application layer, and multiple different products are controlled simultaneously through the unified command set; product control instructions for target products triggered based on the unified command set are received through the application; a protocol layer processing center is set to realize the conversion and translation between the underlying command set of the product and the upper unified command set, and the product control instructions are translated and assembled according to the target product at the protocol layer processing center to obtain an instruction data packet suitable for the target product; the instruction data packet is sent to the protocol layer interface corresponding to the target product, the protocol layer interface is an interface between the protocol layer and the underlying protocol interface, and it can send the instruction data packet to the protocol interface corresponding to the target product, the protocol interface is based on the SDK registration of the product, and can communicate with the underlying target product, so that the target product responds to the product control instruction according to the instruction data packet; this application provides a unified interface for users at the application layer, completes the translation and packaging of instructions at the protocol layer, and only one set of unified command sets is needed to control various embedded products, which reduces the difficulty of product control and improves the efficiency of product control.

[0118] The present application also provides another embodiment, namely, providing a computer-readable storage medium, wherein the computer-readable storage medium stores computer-readable instructions, and the computer-readable instructions can be executed by at least one processor to enable the at least one processor to perform the steps of the product control method as described above.

[0119] In this embodiment, a unified command set that is applied to multiple embedded products at the same time is set at the application layer, and multiple different products are controlled simultaneously through the unified command set; product control instructions for target products triggered based on the unified command set are received through the application; a protocol layer processing center is set to realize the conversion and translation between the underlying command set of the product and the upper unified command set, and the product control instructions are translated and assembled according to the target product at the protocol layer processing center to obtain an instruction data packet suitable for the target product; the instruction data packet is sent to the protocol layer interface corresponding to the target product, the protocol layer interface is an interface between the protocol layer and the underlying protocol interface, and it can send the instruction data packet to the protocol interface corresponding to the target product, the protocol interface is based on the SDK registration of the product, and can communicate with the underlying target product, so that the target product responds to the product control instruction according to the instruction data packet; this application provides a unified interface for users at the application layer, completes the translation and packaging of instructions at the protocol layer, and only one set of unified command sets is needed to control various embedded products, which reduces the difficulty of product control and improves the efficiency of product control.

[0120] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present application, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk), and includes a number of instructions for a terminal device (which can be a mobile phone, computer, server, air conditioner, or network device, etc.) to execute the methods described in each embodiment of the present application.

[0121] Obviously, the embodiments described above are only some embodiments of the present application, rather than all embodiments. The preferred embodiments of the present application are given in the accompanying drawings, but they do not limit the patent scope of the present application. The present application can be implemented in many different forms. On the contrary, the purpose of providing these embodiments is to make the understanding of the disclosure of the present application more thorough and comprehensive. Although the present application is described in detail with reference to the aforementioned embodiments, for those skilled in the art, it is still possible to modify the technical solutions recorded in the aforementioned specific implementation methods, or to perform equivalent replacement of some of the technical features therein. Any equivalent structure made using the contents of the specification and drawings of this application, directly or indirectly used in other related technical fields, is similarly within the scope of patent protection of this application.

Claims

1. A product control method, It is characterized in that The steps include: Receiving, through an application, a product control instruction for a target product triggered based on a unified command set, wherein the unified command set is applied to multiple products at the same time; According to the target product, assembling the product control instructions in the protocol layer processing center to obtain an instruction data packet; The instruction data packet is sent to a protocol layer interface corresponding to the target product, and the instruction data packet is sent to a protocol interface corresponding to the target product through the protocol layer interface, so that the target product responds to the product control instruction according to the instruction data packet, wherein the protocol interface is based on the SDK registration of the product.

2. The product control method according to claim 1, It is characterized in that The step of assembling the product control instructions to obtain an instruction data packet in the protocol layer processing center according to the target product includes: Obtaining a protocol layer specification stored in the protocol layer processing center; According to the protocol layer specification, the product control instructions are assembled into instructions suitable for the target product to obtain an instruction data packet.

3. The product control method according to claim 1, It is characterized in that Before the step of sending the instruction data packet to the protocol interface corresponding to the target product through the protocol layer interface, the method further includes: Obtain a callback function of the target product; The callback function is registered to the SDK of the target product to obtain the protocol interface of the target product, where the protocol interface is used to communicate with the bottom layer of the target product.

4. The product control method according to claim 1, It is characterized in that The step of responding to the product control instruction according to the instruction data packet by the target product comprises: Acquire, through a protocol interface, first data generated by the target product according to the instruction data packet; Acquire the first data through the protocol layer interface, and generate a first data packet according to the first data; Sending the first data packet to the protocol layer processing center through the protocol layer interface; The valid data in the first data packet is sent to the application corresponding to the target product through the protocol layer processing center.

5. The product control method according to claim 4, It is characterized in that The step of sending the valid data in the first data packet to the application corresponding to the target product through the protocol layer processing center includes: Splitting the first data packet into a packet header and valid data by the protocol layer processing center; The protocol layer processing center saves the packet header and sends the valid data to the application corresponding to the target product.

6. The product control method according to claim 5, It is characterized in that After the step of sending the valid data in the first data packet to the application corresponding to the target product through the protocol layer processing center, the method further includes: Processing the valid data through the application, and generating second valid data in response to the valid data according to the unified command set; Acquire the second valid data through the protocol layer processing center, and generate a second data packet according to the second valid data and the packet header; The second data packet is sent to the target product through the protocol layer interface.

7. A product control device, It is characterized in that include: An instruction receiving module, used for receiving, through an application, a product control instruction for a target product triggered based on a unified command set, wherein the unified command set is applied to multiple products at the same time; An instruction assembly module, used for assembling the product control instructions in the protocol layer processing center according to the target product to obtain an instruction data packet; A data packet sending module is used to send the instruction data packet to the protocol layer interface corresponding to the target product, and send the instruction data packet to the protocol interface corresponding to the target product through the protocol layer interface, so that the target product responds to the product control instruction according to the instruction data packet, wherein the protocol interface is based on the SDK registration of the product.

8. The product control device according to claim 7, It is characterized in that The data packet sending module comprises: A first acquisition submodule, used for acquiring first data generated by the target product according to the instruction data packet through a protocol interface; A first generating submodule, used for acquiring the first data through the protocol layer interface, and generating a first data packet according to the first data; A data packet sending submodule, used for sending the first data packet to the protocol layer processing center through the protocol layer interface; The valid sending submodule is used to send the valid data in the first data packet to the application corresponding to the target product through the protocol layer processing center.

9. A computer device, comprising a memory and a processor, wherein the memory stores computer-readable instructions, and the processor implements the steps of the product control method according to any one of claims 1 to 6 when executing the computer-readable instructions.

10. A computer-readable storage medium, It is characterized in that The computer-readable storage medium stores computer-readable instructions, and when the computer-readable instructions are executed by a processor, the steps of the product control method according to any one of claims 1 to 6 are implemented.