WO2021036407A1 - 通信方法及装置、电子设备和存储介质 - Google Patents

通信方法及装置、电子设备和存储介质 Download PDF

Info

Publication number
WO2021036407A1
WO2021036407A1 PCT/CN2020/095340 CN2020095340W WO2021036407A1 WO 2021036407 A1 WO2021036407 A1 WO 2021036407A1 CN 2020095340 W CN2020095340 W CN 2020095340W WO 2021036407 A1 WO2021036407 A1 WO 2021036407A1
Authority
WO
WIPO (PCT)
Prior art keywords
data packet
information
detection
detection result
working mode
Prior art date
Application number
PCT/CN2020/095340
Other languages
English (en)
French (fr)
Inventor
张军伟
李�诚
Original Assignee
上海商汤智能科技有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 上海商汤智能科技有限公司 filed Critical 上海商汤智能科技有限公司
Priority to KR1020217016118A priority Critical patent/KR20210086678A/ko
Priority to JP2021531028A priority patent/JP2022509292A/ja
Priority to SG11202105681QA priority patent/SG11202105681QA/en
Publication of WO2021036407A1 publication Critical patent/WO2021036407A1/zh
Priority to US17/336,957 priority patent/US20210294767A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F13/00Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
    • G06F13/38Information transfer, e.g. on bus
    • G06F13/382Information transfer, e.g. on bus using universal interface adapter
    • G06F13/387Information transfer, e.g. on bus using universal interface adapter for adaptation of different data processing systems to different peripheral devices, e.g. protocol converters for incompatible systems, open system
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V20/00Scenes; Scene-specific elements
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/28Data switching networks characterised by path configuration, e.g. LAN [Local Area Networks] or WAN [Wide Area Networks]
    • H04L12/2803Home automation networks
    • H04L12/2816Controlling appliance services of a home automation network by calling their functionalities
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/08Error detection or correction by redundancy in data representation, e.g. by using checking codes
    • G06F11/10Adding special bits or symbols to the coded information, e.g. parity check, casting out 9's or 11's
    • G06F11/1004Adding special bits or symbols to the coded information, e.g. parity check, casting out 9's or 11's to protect a block of data words, e.g. CRC or checksum
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F13/00Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
    • G06F13/38Information transfer, e.g. on bus
    • G06F13/40Bus structure
    • G06F13/4004Coupling between buses
    • G06F13/4022Coupling between buses using switching circuits, e.g. switching matrix, connection or expansion network
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V40/00Recognition of biometric, human-related or animal-related patterns in image or video data
    • G06V40/10Human or animal bodies, e.g. vehicle occupants or pedestrians; Body parts, e.g. hands
    • G06V40/103Static body considered as a whole, e.g. static pedestrian or occupant recognition
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V40/00Recognition of biometric, human-related or animal-related patterns in image or video data
    • G06V40/10Human or animal bodies, e.g. vehicle occupants or pedestrians; Body parts, e.g. hands
    • G06V40/16Human faces, e.g. facial parts, sketches or expressions
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V40/00Recognition of biometric, human-related or animal-related patterns in image or video data
    • G06V40/10Human or animal bodies, e.g. vehicle occupants or pedestrians; Body parts, e.g. hands
    • G06V40/16Human faces, e.g. facial parts, sketches or expressions
    • G06V40/161Detection; Localisation; Normalisation
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/04Network architectures or network communication protocols for network security for providing a confidential data exchange among entities communicating through data packet networks
    • H04L63/0428Network architectures or network communication protocols for network security for providing a confidential data exchange among entities communicating through data packet networks wherein the data content is protected, e.g. by encrypting or encapsulating the payload
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/12Applying verification of the received information
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/08Protocols for interworking; Protocol conversion
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/16Implementation or adaptation of Internet protocol [IP], of transmission control protocol [TCP] or of user datagram protocol [UDP]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/22Parsing or analysis of headers
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/60Control of cameras or camera modules
    • H04N23/61Control of cameras or camera modules based on recognised objects
    • H04N23/611Control of cameras or camera modules based on recognised objects where the recognised objects include parts of the human body
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/60Control of cameras or camera modules
    • H04N23/64Computer-aided capture of images, e.g. transfer from script file into camera, check of taken image quality, advice or proposal for image composition or decision on when to take image
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/60Control of cameras or camera modules
    • H04N23/66Remote control of cameras or camera parts, e.g. by remote control devices
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/60Control of cameras or camera modules
    • H04N23/667Camera operation mode switching, e.g. between still and video, sport and normal or high- and low-resolution modes
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V2201/00Indexing scheme relating to image or video recognition or understanding
    • G06V2201/07Target detection

Definitions

  • the present disclosure relates to the field of communication technology, and in particular to a communication method and device, electronic equipment, and storage medium.
  • the communication between the upper computer and the lower computer plays an important role, especially in embedded devices.
  • the upper computer can send control instructions to the lower computer, and the lower computer controls the equipment to work according to the received control instructions.
  • the communication between the upper computer and the lower computer can use different communication protocols, and a complete communication protocol can ensure the reliable and efficient transmission of information.
  • the embodiment of the present disclosure provides a communication method, the method includes: obtaining a detection result obtained by performing target detection on an image frame; generating a first data packet in a preset protocol format based on the detection result and a current working mode; The first data packet is sent to the lower computer, so that the lower computer performs image collection of the current scene according to the first data packet. In this way, the communication between the upper computer and the lower computer can be realized through the first data packet of the preset protocol format.
  • the obtaining the detection result obtained by performing target detection on the image frame includes: obtaining the detection result obtained by performing the target detection on the image frame in a shared memory.
  • the upper computer can directly copy the detection results in the shared memory, which improves the efficiency of obtaining the detection results.
  • the generating a first data packet in a preset protocol format based on the detection result and the current working mode includes: generating detection information according to the detection result; and generating detection information according to the current working mode.
  • the mode generates control information; the detection information is added to the detection result field, and the control information is added to the control field to generate the first data packet in a preset protocol format.
  • the detection information and control information can be carried in the detection result field and the control field of the first data packet to realize information communication between the upper computer and the lower computer.
  • the generating detection information according to the detection result includes: adding first verification information to the head and tail of the detection result to generate the detection information. In this way, the reliability of the transmission of the detection result can be guaranteed.
  • the first data packet includes a check field; the method further includes: generating second check information; adding the second check information to the first data packet In the check field, the second check information is used by the lower computer to verify the accuracy of the first data packet.
  • the second verification information By carrying the second verification information in the verification field, the accuracy of the detection information or the control information can be ensured, and the possibility of tampering can be avoided.
  • the generating of the second check information includes: obtaining a preset generator polynomial; generating a binary sequence based on the generating polynomial; generating a binary sequence based on the detection result and the binary sequence The second verification information.
  • the second verification information for verifying the detection result can be obtained, which improves the accuracy of the transmission of the detection result.
  • the first data packet includes a mode flag bit field; the method further includes: determining the working mode corresponding to the detection result according to the working mode when the image frame is collected; Generating the mode flag bit field of the first data packet according to the working mode corresponding to the detection result. In this way, the working mode corresponding to the detection result can be determined through the mode flag bit field, so that the lower computer can better perform the corresponding operation.
  • the method further includes: receiving a second data packet sent by a lower computer; and adjusting the current working mode according to the control information carried in the control field of the second data packet. In this way, the two-way communication between the upper computer and the lower computer can be realized.
  • the working mode includes at least one of the following: a gesture classification mode; a face detection mode; a human body tracking mode; and a sphere detection mode.
  • the upper computer can communicate with the lower computer in a variety of working modes.
  • An embodiment of the present disclosure provides a communication method, the method includes: receiving a first data packet in a preset protocol format sent by an upper computer; and obtaining a detection result obtained by performing target detection on an image frame based on the first data packet And the current working mode; according to the detection result and the current working mode, image collection is performed on the current scene for work. In this way, information communication between the upper computer and the lower computer can be realized.
  • the obtaining the detection result obtained by performing target detection on the image frame and the current working mode based on the first data packet includes: in the detection result field of the first data packet Obtain detection information; obtain the detection result obtained by performing target detection on the image frame according to the detection information; obtain the control information in the control field of the first data packet; and determine the current working mode according to the control information.
  • the lower computer can obtain the detection result obtained by the target detection and determine the current working mode in the first data packet.
  • the obtaining the detection result obtained by performing target detection on the image frame according to the detection information includes: obtaining first verification information at the head and tail of the detection information; In a case where the first verification information matches the preset verification information, the detection result is extracted from the detection information. In this way, the reliability of the transmission of the detection result can be guaranteed.
  • the method further includes: detecting the current working mode; in the case of a change in the working mode, modifying the control field of the first data packet based on the current working mode to obtain the first Two data packets; sending the second data packet to the upper computer. In this way, the information communication process from the lower computer to the upper computer can be realized.
  • the working mode includes at least one of the following: a gesture classification mode; a face detection mode; a human body tracking mode; and a sphere detection mode.
  • the lower computer can communicate with the upper computer in a variety of working modes.
  • the embodiment of the present disclosure provides a communication device, the device includes: an acquisition module configured to acquire a detection result obtained by performing target detection on an image frame; a generation module configured to generate A first data packet in a preset protocol format; a sending module configured to send the first data packet to a lower computer, so that the lower computer collects an image of the current scene according to the first data packet.
  • the generation module is configured to generate detection information according to the detection result; generate control information according to the current working mode; add the detection information to the detection result field, and add all the detection information to the detection result field.
  • the control information is added to the control field to generate the first data packet in a preset protocol format.
  • the generating module is configured to add first verification information to the head and tail of the detection result to generate the detection information.
  • the generation module is configured to obtain a preset generator polynomial; generate a binary sequence based on the generator polynomial; generate the second calibration based on the detection result and the binary sequence ⁇ Inspection information.
  • the first data packet includes a mode flag bit field; the generating module is further configured to determine the working mode corresponding to the detection result according to the working mode when the image frame is collected; The working mode corresponding to the detection result generates the mode flag bit field of the first data packet.
  • the sending module is further configured to exceed the retransmission threshold when the sending time of the first data packet exceeds the retransmission threshold, and the confirmation information returned by the lower computer is not received within the sending time In the case of sending the first data packet to the lower computer again.
  • the device further includes: a receiving module configured to receive a second data packet sent by a lower computer; according to the control information carried in the control field of the second data packet, the current working mode Make adjustments.
  • the working mode includes at least one of the following: a gesture classification mode; a face detection mode; a human body tracking mode; and a sphere detection mode.
  • the embodiment of the present disclosure provides a communication device, the device includes: a receiving module configured to receive a first data packet in a preset protocol format sent by an upper computer; a determining module configured to obtain a data packet based on the first data packet The detection result obtained by performing target detection on the image frame and the current working mode; the control module is configured to perform image collection and work on the current scene according to the detection result and the current working mode.
  • the determining module is configured to obtain detection information in the detection result field of the first data packet; obtain the detection result obtained by performing target detection on the image frame according to the detection information; Acquire control information from the control field of the first data packet; determine the current working mode according to the control information.
  • the determining module is configured to obtain first verification information at the head and tail of the detection information; in the case where the first verification information matches preset verification information , Extracting the detection result from the detection information.
  • the device further includes: a modification module configured to detect the current working mode; when the working mode changes, modify the data packet of the first data packet based on the current working mode. Control the field to obtain the second data packet; send the second data packet to the upper computer.
  • a modification module configured to detect the current working mode; when the working mode changes, modify the data packet of the first data packet based on the current working mode. Control the field to obtain the second data packet; send the second data packet to the upper computer.
  • the working mode includes at least one of the following: a gesture classification mode; a face detection mode; a human body tracking mode; and a sphere detection mode.
  • An embodiment of the present disclosure provides an electronic device, including: a processor; a memory configured to store executable instructions of the processor; wherein the processor is configured to execute the aforementioned communication method.
  • the embodiments of the present disclosure provide a computer-readable storage medium on which computer program instructions are stored, and the computer program instructions implement the above-mentioned communication method when executed by a processor.
  • the embodiments of the present disclosure provide a computer program, including computer-readable code, when the computer-readable code runs in an electronic device, the processor in the electronic device executes to implement one or more of the above-mentioned embodiments Communication method in.
  • the host computer can obtain the detection result obtained by performing target detection on the image frame, and then based on the detection result and the current working mode, generate the first data packet in the preset protocol format, and then send the generated data packet to the lower computer
  • the first data packet enables the lower computer to collect images of the current scene according to the first data packet. In this way, the communication between the upper computer and the lower computer can be realized through the first data packet in the preset protocol format.
  • Fig. 1 shows a flowchart of a communication method according to an embodiment of the present disclosure
  • Fig. 2 shows a block diagram of an information storage format of a shared memory according to an embodiment of the present disclosure
  • Fig. 3 shows a block diagram of an information storage format of a detection result according to an embodiment of the present disclosure
  • Fig. 4 shows a block diagram of a first data packet format according to an embodiment of the present disclosure
  • a host computer can obtain the detection result obtained by performing target detection on an image frame, and then based on the detection result and the current working mode, generate a first data packet in a preset protocol format, and then send it to The lower computer sends the first data packet, so that the lower computer collects an image of the current scene according to the first data packet.
  • the information communication between the upper computer and the lower computer is realized. For example, to realize the information communication between the Raspberry Pi (upper computer) and the control module (lower computer) of the intelligent robot.
  • Fig. 1 shows a flowchart of a communication method according to an embodiment of the present disclosure.
  • the communication method can be executed by a terminal device, a server, or other types of electronic devices, where the terminal device can be a user equipment (UE), a mobile device, a user terminal, a terminal, a cellular phone, a cordless phone, or a personal digital processing ( Personal Digital Assistant, PDA), handheld devices, computing devices, vehicle-mounted devices, wearable devices, smart robots, etc.
  • the communication method can be implemented by a processor invoking computer-readable instructions stored in the memory.
  • the communication method of the embodiment of the present disclosure will be described below by taking the electronic device as the execution subject as an example.
  • the upper computer can obtain the detection result stored in the memory.
  • the detection result may be obtained by performing target detection on the target object in the image frame collected by the lower computer, for example, performing target detection on the sphere in the image frame to obtain the target detection result for the sphere.
  • the detection result may be the image coordinates of the target object in the image frame, or may be the world coordinates of the target object in the three-dimensional space.
  • the Raspberry Pi can be used as a host computer and can be used in intelligent robots. The intelligent robot can collect the image frame of the current scene in real time, and then the Raspberry Pi (host computer) can obtain the detection result of the target detection on the image frame.
  • the detection result obtained by performing target detection on the image frame may be obtained in the shared memory.
  • the host computer can create a shared memory and store the detection results of the image frames in the shared memory in real time, so that the host computer can directly copy the detection results in the shared memory, improving the efficiency of obtaining the detection results.
  • the detection result can be stored in the shared memory, but also the image frame and the working mode corresponding to the detection result can be stored in real time.
  • the working mode corresponding to the detection result may be the working mode of the upper computer and the lower computer when the target detection is performed on the image frame.
  • the working mode may include one of the gesture classification mode, the face detection mode, the human tracking mode, and the sphere detection mode.
  • the target detection performed on the image frame corresponds to the working mode, that is, the target object for target detection on the image frame can be determined according to the working mode.
  • the target object in the gesture classification mode, the target object may be a gesture image in an image frame, and in the face detection mode, the target object may be a face image in an image frame.
  • Fig. 2 shows a block diagram of an information storage format of a shared memory according to an embodiment of the present disclosure.
  • the shared memory can include a flag bit part, an image content part, and a detection result part.
  • the flag bit part can store the flag bit that identifies the target detection status and working mode of the current image frame.
  • the target detection status can be whether the current image frame has undergone target detection processing. For example, when the flag bit is 1, it can indicate the current
  • the image frame undergoes gesture detection.
  • the image content part can store the current image frame. For example, every time an image frame is collected by a smart robot, the Raspberry Pi can store the image frame in the image content part of the shared memory.
  • the detection result part may store the detection result of the target detection performed on the current image frame.
  • the detection result may be the image coordinates of the face or the world coordinates.
  • a corresponding storage space can be allocated for each part included in the shared memory. For example, a storage space of 8 bytes can be allocated for the flag bit, and a storage space of 50K bytes can be allocated for the image content part, which is As a result, the allocation size is 72 bytes of storage space.
  • the content cached in the shared memory can be continuously updated, that is, each time an image frame is collected, the content of the shared memory can be updated to the flag bit, image content, and detection result corresponding to the current image frame.
  • Fig. 3 shows a block diagram of an information storage format of a detection result according to an embodiment of the present disclosure.
  • the detection result part of the shared content may store the detection result of at least one target object in the current image frame, that is, the image coordinates or world coordinates of the target object, and the detection result may use the image coordinates or world coordinates of several points.
  • the detection result part can store the detection results of N target objects. N is a positive integer greater than 0. Among them, the points on the upper, lower, left, and right edges of the contour of the target object 1 can be selected. The image coordinates or world coordinates of the four edge points are used as the detection result of the target object 1.
  • Step S12 based on the detection result and the current working mode, generate a first data packet in a preset protocol format.
  • the host computer may detect the current working mode, and then encapsulate the detection result of the current image frame and the current working mode in the first data packet of the preset protocol format.
  • the preset protocol format may be a Transmission Control Protocol/Internet Protocol (TCP/IP) protocol format.
  • the current working mode may be the same as or different from the working mode corresponding to the detection result. The current working mode can be set by the user.
  • the host computer may directly use the identification information indicating the current working mode as control information, or the host computer may encrypt the identification information indicating the current working mode to obtain the control information.
  • the detection information and control information can be carried in the detection result field and the control field of the first data packet to realize information communication with the lower computer.
  • the lower computer can verify the detection information in the detection result field of the first data packet by using the first check information negotiated with the upper computer in advance.
  • the corresponding instruction can be executed according to the detection information; otherwise, the received first data packet can be discarded without any processing. In this way, the reliability of the transmission of the detection result can be guaranteed.
  • Step S13 Send the first data packet to a lower computer, so that the lower computer collects an image of the current scene according to the first data packet.
  • the upper computer may send the first data packet to the lower computer.
  • the upper computer and the lower computer can be connected in a variety of ways, for example, they can be connected through a serial interface, or they can be connected wirelessly.
  • the Raspberry Pi can be connected to the control module of the intelligent robot through a serial interface, and the Raspberry Pi can send the first data packet to the control module of the intelligent robot through the serial interface.
  • the lower-level computer can obtain the detection information from the detection result field of the first data packet by analyzing the first data packet, and obtain the control information from the control field of the first data packet, and then According to the working mode indicated by the control information and the position of the target object indicated by the detection result, corresponding operations are performed, for example, tracking and shooting the target object.
  • Fig. 4 shows a block diagram of a first data packet format according to an embodiment of the present disclosure.
  • the first data packet may also include a check field.
  • the above method may further include: generating second verification information; adding the second verification information to the verification field of the first data packet, wherein the second verification information is used in the lower computer Verify the accuracy of the first data packet.
  • the first data packet may include a check field, for example, the check field may be 16 bits.
  • the upper computer can generate the second verification information, for example, using a random number to generate the second verification information, and then can use the second verification information to encrypt the detection information or the control information, and add the second verification information to the first data In the check field of the packet.
  • the lower computer can use the second check information in the check field to decrypt the detection information or control information. In the case of successful decryption, it can execute the corresponding detection result and control information according to the obtained detection result and control information. Otherwise, the first data packet received can be discarded.
  • a preset generator polynomial can be obtained, a binary sequence is generated based on the generator polynomial, and the second check information is generated based on the detection result and the binary sequence.
  • the second verification information for verifying the detection result may be generated for the detection result.
  • the generator polynomial here can be negotiated with the lower computer in advance.
  • the generator polynomial can be a supervisory code sequence, and the generator polynomial can be converted into a binary sequence.
  • the number of bits in the binary sequence can be a positive integer, such as 8 bits, 4 bits, and so on.
  • the first data packet includes a mode flag bit field; the above method may further include: determining the working mode corresponding to the detection result according to the working mode when the image frame is collected; As a result, the corresponding working mode is generated, and the mode flag bit field of the first data packet is generated.
  • the upper computer may again Sending the first data packet to the lower computer.
  • the upper computer may store the retransmission threshold in the retransmission threshold field of the first data packet, and the retransmission threshold may be set according to actual application scenarios.
  • the host computer After the host computer sends the first data packet, it can calculate the sending time of the first data packet. In the case that the sending time exceeds the retransmission threshold, the upper computer does not receive the return confirmation information for the first data packet sent by the lower computer, and it can be considered that the lower computer has not received the first data packet or the first data packet has If you have problems such as errors, you can re-send the first data packet to the lower computer. In this way, it can be ensured that the first data packet successfully reaches the lower computer, and the communication between the upper computer and the lower computer is guaranteed.
  • the first data packet may also include an optional field.
  • the optional field can be set according to the communication protocol format of the first data packet in the actual application scenario, so that the One data package is improved and optimized.
  • the upper computer may receive the second data packet sent by the lower computer; and adjust the current working mode according to the control information carried in the control field of the second data packet.
  • the lower computer can be connected to multiple sensors and receive electrical signals transmitted by at least one sensor, and the user can set the current working mode through the sensor.
  • the lower computer determines the working mode set by the user by detecting the electrical signal of the sensor.
  • the lower computer can directly generate control information from the current working mode and add the control information to the control field of the second data packet, or it can add the encrypted control information to the control field of the second data packet, and the upper computer can add the control information to the control field of the second data packet.
  • the machine sends the second data packet. After the host computer receives the second data packet, it can parse out the current working mode in the control field of the second data packet, and adjust its own working mode to the parsed working mode.
  • the Raspberry Pi according to the control module of the intelligent robot
  • the transmitted second data packet adjusts the working mode from the original face detection mode to the sphere detection mode. In this way, the two-way communication between the upper computer and the lower computer can be realized.
  • the upper computer can also obtain some other information sent by the lower computer in the second data packet, for example, obtain some information such as the rotating speed and speed of the intelligent robot in the second data packet, so that the upper computer can communicate with The two-way communication of the lower computer can better understand the current motion state of the intelligent robot.
  • Fig. 5 shows a flowchart of a communication method according to an embodiment of the present disclosure.
  • the communication method can be applied to a lower computer, and the method can include the following steps:
  • Step S21 Receive the first data packet in the preset protocol format sent by the host computer.
  • the lower computer may receive the first data packet of the preset protocol format sent by the upper computer, where the preset protocol format may be the TCP/IP protocol format.
  • the control module (lower computer) of the intelligent robot can receive the first data packet sent by the Raspberry Pi (upper computer) through the serial interface.
  • Step S22 based on the first data packet, obtain the detection result obtained by performing target detection on the image frame and the current working mode.
  • the lower computer may obtain the detection result obtained by performing target detection on the image frame in the detection result field of the first data packet, and obtain the current working mode in the control field of the first data packet.
  • the working mode here includes one or more of gesture classification mode, face detection mode, human tracking mode, and sphere detection mode.
  • the lower computer may determine the position of the target object according to the detection result, and the position may be the world coordinates or image coordinates of the target object. Then, according to the current working mode and the position of the target object indicated by the detection result, the corresponding image acquisition is performed, for example, the target object is tracked and photographed. In this way, information communication between the upper computer and the lower computer can be realized.
  • the lower-level computer may obtain detection information in the detection result field of the first data packet, and obtain the detection result obtained by performing target detection on the image frame according to the detection information.
  • the lower computer may obtain control information in the control field of the first data packet, and determine the current working mode according to the control information.
  • the lower computer can directly obtain the detection result of the target object from the detection information in the detection result field, or it can decrypt the detection information of the detection result field by negotiating with the upper computer in advance to obtain the detection of the target object. result.
  • the lower computer may obtain the first verification information at the head and tail of the detection information, and in the case that the first verification information matches the preset verification information, the The detection result is extracted from the detection information.
  • the first verification information may be negotiated in advance by the upper computer and the lower computer, and the first verification information at the head and tail of the verification information may be the same or different.
  • the first verification information of the header may be set to 0X7e
  • the first verification information of the tail may be set to 0Xac.
  • the lower computer can verify the detection information in the detection result field of the first data packet by using the first check information negotiated with the upper computer. In the case where the first verification information matches, the current working mode can be determined from the detection information. Otherwise, the first data packet received can be discarded without any processing. In this way, the reliability of the transmission of the detection result can be guaranteed.
  • the second verification information may be set for the detection result.
  • the second verification information may be carried in the verification field of the first data packet.
  • the lower computer can obtain the pre-stored generator polynomial, the binary sequence generated by the generator polynomial, or directly obtain the stored binary sequence. Then divide the second check information by the binary sequence to obtain the remainder. In the case where the remainder is 0, the check result can be considered to be a pass. Otherwise, the verification result can be regarded as a verification failure. In the case that the verification is passed, the detection result can be obtained from the detection result field, and in the case of the verification failure, the first data packet can be discarded. In this way, the lower computer can obtain accurate detection results and avoid tampering with the detection results.
  • the method further includes: detecting the current working mode; in the case of a change in the working mode, modifying the control field of the first data packet based on the current working mode to obtain the first Two data packets; sending the second data packet to the upper computer.
  • the lower computer can be connected to multiple sensors, such as a touch sensor, a light sensor, an infrared sensor, etc., to receive electrical signals transmitted by at least one sensor, and the user can set the current working mode through the sensor.
  • the lower computer determines the working mode set by the user by detecting the electrical signal of the sensor.
  • the lower computer can directly generate control information from the current working mode and add the control information to the control field of the second data packet, or it can add the encrypted control information to the control field of the second data packet, and the upper computer can add the control information to the control field of the second data packet.
  • the machine sends the second data packet. Therefore, the upper computer can adjust the current working mode according to the control field in the second data packet. In this way, the information communication process from the lower computer to the upper computer can be realized.
  • the lower computer can also actively send other information to the upper computer, such as the rotation speed and speed of the intelligent robot. Some information is carried in the second data packet and sent to the upper computer.
  • the educational robot mindstorms-EV3 built by combining Lego and Raspberry Pi is an emerging teaching aid for programming education and the popularization of artificial intelligence.
  • the two-way communication between Lego and Raspberry Pi is the most basic problem.
  • the communication methods of upper and lower computers in related technologies include the use of status registers and task unit sequences.
  • a complete communication protocol can ensure reliable and efficient data transmission. But it is more difficult to design and implement a complete and unified protocol.
  • the protocol specification depends on the relevant hardware interface, and the upper and lower computer equipment and connection methods are also diverse, and it is impossible to set a unified standard.
  • a verification mechanism and a retransmission mechanism are needed. However, retransmission and verification will reduce the real-time performance of data transmission to a certain extent, so the protocol needs to be modified according to different demand scenarios.
  • the protocol design also needs to realize the two-way interaction between the upper and lower computers.
  • Step S31 Create a shared memory on the Raspberry Pi to store information such as flag bits, pictures, and picture detection results.
  • the main application field of the embodiments of the present disclosure is intelligent robots under the educational background.
  • the intelligent robots can realize functions such as gesture classification, face detection, and human tracking.
  • the embodiments of the present disclosure provide a two-way communication protocol between Raspberry Pi and Lego EV3. . Complete image collection and image detection tasks with different functions on the Raspberry Pi.
  • a shared memory is created on the Raspberry Pi. The main information format of the shared memory is shown in Figure 2.
  • the shared memory information format in Figure 2 mainly includes three parts of content, flag bits, image content, and detection results.
  • the function of the flag bit is as follows: to identify whether the currently collected picture has undergone detection processing, and to identify different detection function modes; the picture content part is the picture storage area, and the collected video data can be stored in this part after framing; the detection result part is stored Picture detection information, the content size of this part is 72Bytes, mainly for storing multi-target detection result information, the information is shown in Figure 3.
  • the flag bit and the picture content are continuously updated every frame, but they are not used as data transmission content, and the detection result information of each frame is encapsulated in a data packet.
  • Step S32 Change the shared memory flag bit, perform the next frame picture detection, and encapsulate the detection result information into a data field.
  • the function mode field and the detection result information field are retained in the shared memory at the same time, and the detection result information is directly encapsulated into the corresponding detection information part.
  • a check is added to both the head and the tail of the detection result. byte.
  • the head check byte can be 0X7e, and the tail byte can be 0Xac.
  • EV3 After EV3 receives the data packet, it will first parse out the detection result field, and then check the first and last byte information. When the verification is passed, the corresponding instruction is executed according to the detection result; when the verification fails, the data packet will be discarded without any processing.
  • Step S33 Calculate the CRC check field according to the data field.
  • a CRC (Cyclic Redundancy Check, cyclic redundancy check) check field is added to the data packet. This field is only checked against the detection result, and the check bit is a total of 16 bits of information.
  • a CRC check is performed at the same time to obtain the detection result sequence. If the check fails, the data packet will be discarded.
  • EV3 and Raspberry Pi need to start corresponding services at the same time.
  • the start and switching of services need to be set through the control field.
  • the service and corresponding control types are shown in Table 1 above.
  • An embodiment of the present disclosure also provides an electronic device, including: a processor; a memory configured to store executable instructions of the processor; wherein the processor is configured as the aforementioned method.
  • the electronic device 1900 may also include a power supply component 1926 configured to perform power management of the electronic device 1900, a wired or wireless network interface 1950 configured to connect the electronic device 1900 to the network, and an input/output (Input/Output, I/ O) Interface 1958.
  • the electronic device 1900 can operate based on an operating system stored in the memory 1932, such as Windows ServerTM, Mac OS XTM, UnixTM, LinuxTM, FreeBSDTM or the like.
  • the remote computer can be connected to the user's computer through any kind of network-including local area network (LAN) or wide area network (WAN)-or it can be connected to an external computer (such as Use an Internet service provider to connect via the Internet).
  • the electronic circuit is personalized by using the state information of the computer-readable program instructions, such as programmable logic circuit, field programmable gate array (FPGA) or programmable logic array (programmable logic). array, PLA), the electronic circuit can execute computer-readable program instructions to realize various aspects of the present disclosure.
  • each block in the block diagram and/or flowchart, and the combination of the blocks in the block diagram and/or flowchart can be implemented by a dedicated hardware-based system that performs the specified functions or actions Or it can be realized by a combination of dedicated hardware and computer instructions.

Abstract

本公开涉及一种通信方法及装置、电子设备和存储介质,其中,所述方法包括:获取对图像帧进行目标检测得到的检测结果;基于所述检测结果以及当前的工作模式,生成预设协议格式的第一数据包;向下位机发送所述第一数据包,以使所述下位机根据所述第一数据包对当前场景进行图像采集。

Description

通信方法及装置、电子设备和存储介质
相关申请的交叉引用
本公开基于申请号为201910809368.5、申请日为2019年8月29日的中国专利申请提出,并要求该中国专利申请的优先权,该中国专利申请的全部内容在此以全文引入的方式引入本公开。
技术领域
本公开涉及通信技术领域,尤其涉及一种通信方法及装置、电子设备和存储介质。
背景技术
在通信技术领域中,上位机和下位机通信具有重要的作用,特别在嵌入式设备中。通常,上位机可以向下位机发送控制指令,下位机根据接收的控制指令控制设备工作。通常,上位机和下位机的通信可以使用不同的通信协议,完备的通信协议可以保证信息可靠高效地传输。
发明内容
本公开实施例提出了一种通信方法及装置、电子设备和存储介质。
本公开实施例提供了一种通信方法,所述方法包括:获取对图像帧进行目标检测得到的检测结果;基于所述检测结果以及当前的工作模式,生成预设协议格式的第一数据包;向下位机发送所述第一数据包,以使所述下位机根据所述第一数据包对当前场景进行图像采集。这样,可以通过预设协议格式的第一数据包,实现上位机和下位机之间的通信。
在一种可能的实现方式中,所述获取对图像帧进行目标检测得到的检测结果,包括:在共享内存中获取对图像帧进行目标检测得到的检测结果。这样,上位机可以在共享内存中直接对检测结果进行复制,提高检测结果获取的效率。
在一种可能的实现方式中,所述基于所述检测结果以及当前的工作模式,生成预设协议格式的第一数据包,包括:根据所述检测结果生成检测信息;根据所述当前的工作模式生成控制信息;将所述检测信息添加在检测结果字段中,将所述控制信息添加在控制字段中,生成预设协议格式的所述第一数据包。这样,检测信息和控制信息可以携带在第一数据包的检测结果字段和控制字段中,实现上位机与下位机的信息通信。
在一种可能的实现方式中,所述根据所述检测结果生成检测信息,包括:在所述检测结果的头部和尾部添加第一校验信息,生成所述检测信息。这样,可以保证检测结果传输的可靠性。
在一种可能的实现方式中,所述第一数据包包括校验字段;所述方法还包括:生成第二校验信息;将所述第二校验信息添加在所述第一数据包的校验字段中,其中,所述第二校验信息用于所述下位机对所述第一数据包的准确性进行验证。通过在校验字段中 携带第二校验信息,可以保证检测信息或者控制信息的准确性,避免被篡改的可能性。
在一种可能的实现方式中,所述生成第二校验信息,包括:获取预设的生成多项式;基于所述生成多项式,生成二进制序列;基于所述检测结果以及所述二进制序列,生成所述第二校验信息。通过这种方式,可以得到对检测结果进行校验的第二校验信息,提高检测结果传输的准确性。
在一种可能的实现方式中,所述第一数据包包括模式标志位字段;所述方法还包括:根据采集所述图像帧时的工作模式,确定所述检测结果对应的工作模式;基于所述检测结果对应的工作模式,生成所述第一数据包的模式标志位字段。这样,通过模式标志位字段可以确定检测结果对应的工作模式,从而下位机可以更好地执行相应的操作。
在一种可能的实现方式中,所述方法还包括:在所述第一数据包的发送时间超过重传阈值,并且,在所述发送时间内未接收所述下位机返回的确认信息的情况下,再次向所述下位机发送所述第一数据包。这样,可以确保第一数据包成功达到下位机,保证上位机与下位机之间的通信。
在一种可能的实现方式中,所述方法还包括:接收下位机发送的第二数据包;根据所述第二数据包的控制字段携带的控制信息,对当前的工作模式进行调整。通过这种方式,可以实现上位机与下位机的双向通信。
在一种可能的实现方式中,所述工作模式,包括以下至少一种:手势分类模式;人脸检测模式;人体跟踪模式;球体检测模式。这样,上位机可以与下位机在多种工作模式下进行通信。
本公开实施例提供了一种通信方法,所述方法包括:接收上位机发送的预设协议格式的第一数据包;基于所述第一数据包,得到对图像帧进行目标检测得到的检测结果以及当前的工作模式;根据所述检测结果以及当前的工作模式对当前场景进行图像采集进行工作。通过这种方式,可以实现上位机和下位机的信息通信。
在一种可能的实现方式中,所述基于所述第一数据包,得到对图像帧进行目标检测得到的检测结果以及当前的工作模式,包括:在所述第一数据包的检测结果字段中获取检测信息;根据所述检测信息得到对图像帧进行目标检测得到的检测结果;在所述第一数据包的控制字段中获取控制信息;根据所述控制信息确定当前工作模式。这样,下位机可以在第一数据包中得到目标检测得到的检测结果以及确定当前工作模式。
在一种可能的实现方式中,所述根据所述检测信息得到对图像帧进行目标检测得到的检测结果,包括:在所述检测信息的头部和尾部获取第一校验信息;在所述第一校验信息匹配预设校验信息的情况下,在所述检测信息中提取所述检测结果。这样,可以保证检测结果传输的可靠性。
在一种可能的实现方式中,所述在所述第一数据包的检测结果字段中获取检测信息,包括:在所述第一数据包的校验字段中,获取第二校验信息;获取由预设的生成多项式生成的二进制序列;利用所述二进制序列对所述第二校验信息进行校验,得到校验结果;在所述校验结果为校验通过的情况下,在所述第一数据包中获取所述检测结果。这样, 下位机可以获取准确地检测结果,避免检测结果被篡改。
在一种可能的实现方式中,所述方法还包括:检测当前的工作模式;在所述工作模式发生改变的情况下,基于当前的工作模式修改所述第一数据包的控制字段,得到第二数据包;向上位机发送所述第二数据包。这样,可以实现下位机到上位机的信息通信过程。
在一种可能的实现方式中,所述工作模式包括以下至少一种:手势分类模式;人脸检测模式;人体跟踪模式;球体检测模式。这样,下位机可以与上位机在多种工作模式下进行通信。
本公开实施例提供了一种通信装置,所述装置包括:获取模块,配置为获取对图像帧进行目标检测得到的检测结果;生成模块,配置为基于所述检测结果以及当前的工作模式,生成预设协议格式的第一数据包;发送模块,配置为向下位机发送所述第一数据包,以使所述下位机根据所述第一数据包对当前场景进行图像采集。
在一种可能的实现方式中,所述获取模块,配置为在共享内存中获取对图像帧进行目标检测得到的检测结果。
在一种可能的实现方式中,所述生成模块,配置为根据所述检测结果生成检测信息;根据所述当前的工作模式生成控制信息;将所述检测信息添加在检测结果字段中,将所述控制信息添加在控制字段中,生成预设协议格式的所述第一数据包。
在一种可能的实现方式中,所述生成模块,配置为在所述检测结果的头部和尾部添加第一校验信息,生成所述检测信息。
在一种可能的实现方式中,所述第一数据包包括校验字段;所述生成模块还配置为生成第二校验信息;将所述第二校验信息添加在所述第一数据包的校验字段中,其中,所述第二校验信息配置为所述下位机对所述第一数据包的准确性进行验证。
在一种可能的实现方式中,所述生成模块,配置为获取预设的生成多项式;基于所述生成多项式,生成二进制序列;基于所述检测结果以及所述二进制序列,生成所述第二校验信息。
在一种可能的实现方式中,所述第一数据包包括模式标志位字段;所述生成模块还配置为根据采集所述图像帧时的工作模式,确定所述检测结果对应的工作模式;基于所述检测结果对应的工作模式,生成所述第一数据包的模式标志位字段。
在一种可能的实现方式中,所述发送模块,还配置为在所述第一数据包的发送时间超过重传阈值,并且,在所述发送时间内未接收所述下位机返回的确认信息的情况下,再次向所述下位机发送所述第一数据包。
在一种可能的实现方式中,所述装置还包括:接收模块,配置为接收下位机发送的第二数据包;根据所述第二数据包的控制字段携带的控制信息,对当前的工作模式进行调整。
在一种可能的实现方式中,所述工作模式,包括以下至少一种:手势分类模式;人脸检测模式;人体跟踪模式;球体检测模式。
本公开实施例提供了一种通信装置,所述装置包括:接收模块,配置为接收上位机发送的预设协议格式的第一数据包;确定模块,配置为基于所述第一数据包,得到对图像帧进行目标检测得到的检测结果以及当前的工作模式;控制模块,配置为根据所述检测结果以及当前的工作模式对当前场景进行图像采集进行工作。
在一种可能的实现方式中,所述确定模块,配置为在所述第一数据包的检测结果字段中获取检测信息;根据所述检测信息得到对图像帧进行目标检测得到的检测结果;在所述第一数据包的控制字段中获取控制信息;根据所述控制信息确定当前工作模式。
在一种可能的实现方式中,所述确定模块,配置为在所述检测信息的头部和尾部获取第一校验信息;在所述第一校验信息匹配预设校验信息的情况下,在所述检测信息中提取所述检测结果。
在一种可能的实现方式中,所述确定模块,配置为在所述第一数据包的校验字段中,获取第二校验信息;获取由预设的生成多项式生成的二进制序列;利用所述二进制序列对所述第二校验信息进行校验,得到校验结果;在所述校验结果为校验通过的情况下,在所述第一数据包中获取所述检测结果。
在一种可能的实现方式中,所述装置还包括:修改模块,配置为检测当前的工作模式;在所述工作模式发生改变的情况下,基于当前的工作模式修改所述第一数据包的控制字段,得到第二数据包;向上位机发送所述第二数据包。
在一种可能的实现方式中,所述工作模式包括以下至少一种:手势分类模式;人脸检测模式;人体跟踪模式;球体检测模式。
本公开实施例提供了一种电子设备,包括:处理器;配置为存储处理器可执行指令的存储器;其中,所述处理器被配置为执行上述通信方法。
本公开实施例提供了一种计算机可读存储介质,其上存储有计算机程序指令,所述计算机程序指令被处理器执行时实现上述通信方法。
本公开实施例提供了一种计算机程序,包括计算机可读代码,当所述计算机可读代码在电子设备中运行时,所述电子设备中的处理器执行用于实现上述一个或多个实施例中的通信方法。
在本公开实施例中,上位机可以获取对图像帧进行目标检测得到的检测结果,然后基于检测结果以及当前的工作模式,生成预设协议格式的第一数据包,再向下位机发送生成的第一数据包,以使下位机根据所述第一数据包对当前场景进行图像采集,这样,可以通过预设协议格式的第一数据包,实现上位机和下位机之间的通信。
应当理解的是,以上的一般描述和后文的细节描述仅是示例性和解释性的,而非限制本公开。
根据下面参考附图对示例性实施例的详细说明,本公开实施例的其它特征及方面将变得清楚。
附图说明
此处的附图被并入说明书中并构成本说明书的一部分,这些附图示出了符合本公开 的实施例,并与说明书一起用于说明本公开的技术方案。
图1示出根据本公开实施例的通信方法的流程图;
图2示出根据本公开实施例的共享内存的信息存储格式的框图;
图3示出根据本公开实施例的检测结果的信息存储格式的框图;
图4示出根据本公开实施例的第一数据包格式的框图;
图5示出根据本公开实施例的一种通信方法的流程图;
图6示出根据本公开实施例的通信装置一示例的框图;
图7示出根据本公开实施例的通信装置一示例的框图;
图8示出根据本公开实施例的电子设备示例的框图。
具体实施方式
以下将参考附图详细说明本公开的各种示例性实施例、特征和方面。附图中相同的附图标记表示功能相同或相似的元件。尽管在附图中示出了实施例的各种方面,但是除非特别指出,不必按比例绘制附图。
在这里专用的词“示例性”意为“用作例子、实施例或说明性”。这里作为“示例性”所说明的任何实施例不必解释为优于或好于其它实施例。
本文中术语“和/或”,仅仅是一种描述关联对象的关联关系,表示可以存在三种关系,例如,A和/或B,可以表示:单独存在A,同时存在A和B,单独存在B这三种情况。另外,本文中术语“至少一种”表示多种中的任意一种或多种中的至少两种的任意组合,例如,包括A、B、C中的至少一种,可以表示包括从A、B和C构成的集合中选择的任意一个或多个元素。
另外,为了更好的说明本公开实施例,在下文的实施方式中给出了众多的细节。本领域技术人员应当理解,没有某些细节,本公开实施例同样可以实施。在一些实例中,对于本领域技术人员熟知的方法、手段、元件和电路未作详细描述,以便于凸显本公开实施例的主旨。以下将参考附图详细说明本公开的各种示例性实施例、特征和方面。附图中相同的附图标记表示功能相同或相似的元件。尽管在附图中示出了实施例的各种方面,但是除非特别指出,不必按比例绘制附图。
本公开实施例提供的一种信息通信方案,上位机可以获取对图像帧进行目标检测得到的检测结果,然后基于检测结果以及当前的工作模式,生成预设协议格式的第一数据包,再向下位机发送所述第一数据包,以使所述下位机根据所述第一数据包对当前场景进行图像采集。如此,实现上位机与下位机之间的信息通信。例如,实现树莓派(上位机)与智能机器人的控制模块(下位机)之间的信息通信。
图1示出根据本公开实施例的通信方法的流程图。该通信方法可以由终端设备、服务器或其它类型的电子设备执行,其中,终端设备可以为用户设备(User Equipment,UE)、移动设备、用户终端、终端、蜂窝电话、无绳电话、个人数字处理(Personal Digital Assistant,PDA)、手持设备、计算设备、车载设备、可穿戴设备、智能机器人等。在一些可能的实现方式中,该通信方法可以通过处理器调用存储器中存储的计算机可读指令 的方式来实现。下面以电子设备作为执行主体为例对本公开实施例的通信方法进行说明。
步骤S11,获取对图像帧进行目标检测得到的检测结果;
在本公开实施例中,上位机可以获取存储在内存中的检测结果。检测结果可以是对下位机采集的图像帧中的目标对象进行目标检测得到的,例如,对图像帧中的球体进行目标检测得到针对球体的目标检测结果。这里,检测结果可以是目标对象在图像帧中的图像坐标,或者,可以是目标对象在三维空间中的世界坐标。举例来说,树莓派可以作为上位机,可以应用在智能机器人中。智能机器人可以实时采集当前场景的图像帧,然后树莓派(上位机)可以获取对图像帧进行目标检测的检测结果。
在一种可能的实现方式中,可以在共享内存中获取对图像帧进行目标检测得到的检测结果。这里,上位机可以创建共享内存,并将图像帧的检测结果实时存储在共享内存中,从而上位机可以在共享内存中直接对检测结果进行复制,提高检测结果获取的效率。
在一个示例中,共享内存中不仅可以存储检测结果,还可以实时存储图像帧以及检测结果对应的工作模式。检测结果对应的工作模式可以是对图像帧进行目标检测时上位机与下位机的工作模式,该工作模式可以包括手势分类模式、人脸检测模式、人体跟踪模式、球体检测模式中的一种或多种,相应地,对图像帧进行的目标检测与该工作模式相对应,即,可以根据工作模式可以确定对图像帧进行目标检测的目标对象。例如,在手势分类模式下,目标对象可以是图像帧中的手势图像,在人脸检测模式下,目标对象可以是图像帧中的人脸图像。
图2示出根据本公开实施例的共享内存的信息存储格式的框图。共享内存可以包括标志位部分、图像内容部分以及检测结果部分。其中,标志位部分可以存储标识当前的图像帧的目标检测状态以及工作模式的标志位,目标检测状态可以是当前的图像帧是否经过目标检测处理,例如,标志位为1时,可以表示当前的图像帧经过手势检测。图像内容部分可以存储当前的图像帧,例如,智能机器人每采集一个图像帧,树莓派可以将该图像帧存储在共享内存的图像内容部分。检测结果部分可以存储当前的图像帧进行目标检测的检测结果,例如,在目标检测为人脸检测的情况下,检测结果可以人脸的图像坐标或者世界坐标。这里,可以为共享内存包括的每个部分分配相应的存储空间,举例来说,可以为标志位分配大小是8字节的存储空间,为图像内容部分分配大小是50K字节的存储空间,为检测结果分配大小是72字节的存储空间。这里,可以不断对共享内存中缓存的内容进行更新,即,每采集一个图像帧,可以将共享内存的内容更新为当前的图像帧对应的标志位、图像内容和检测结果。
图3示出根据本公开实施例的检测结果的信息存储格式的框图。
在一个示例中,共享内容的检测结果部分可以存储当前的图像帧中至少一个目标对象的检测结果,即,目标对象的图像坐标或世界坐标,该检测结果可以用若干个点的图像坐标或世界坐标进行表示,例如,检测结果部分可以存储N个目标对象的检测结果,N是大于0的正整数,其中,可以选取目标对象1轮廓的上、下、左、右四个边缘的点,将这四个边缘的点的图像坐标或世界坐标作为目标对象1的检测结果。
步骤S12,基于所述检测结果以及当前的工作模式,生成预设协议格式的第一数据包。
在本公开实施例中,上位机可以检测当前的工作模式,然后将当前的图像帧的检测结果和当前的工作模式封装在预设协议格式的第一数据包中。这里,预设协议格式可以是传输控制/互联网(Transmission Control Protocol/Internet Protocol,TCP/IP)协议格式。这里,当前的工作模式可以与检测结果对应的工作模式相同或者不同。当前的工作模式可以由用户进行设定。
在一种可能的实现方式中,可以根据检测结果生成检测信息,根据当前的工作模式生成控制信息,然后将检测信息添加在检测结果字段中,以及,将控制信息添加在控制字段中,生成预设协议格式的第一数据包。在该实现方式中,第一数据包可以包括检测结果字段以及控制字段。检测结果字段中可以添加由检测结果生成的检测信息,控制字段中可以添加由当前的工作模式生成的控制信息。上位机可以将检测结果直接作为检测信息添加在检测结果字段中,或者,可以对检测结果进行加密处理,将加密后的检测结果作为检测信息添加在检测结果字段中。相应地,上位机可以将表示当前的工作模式的标识信息直接作为控制信息,或者,上位机可以将表示当前的工作模式的标识信息进行加密得到控制信息。这样,检测信息和控制信息可以携带在第一数据包的检测结果字段和控制字段中,实现与下位机的信息通信。
在该实现方式的一个示例中,在所述检测结果的头部和尾部添加第一校验信息,生成所述检测信息。在该示例中,为了保证检测结果传输的可靠性,可以在检测结果的头部和尾部分别添加第一校验信息,头部添加的第一校验信息与尾部添加第一校验信息可以相同也可以不同。这里,第一校验信息可以是上位机和下位机预先协商的,例如,可以将头部的第一校验信息设置为0X7e,将尾部的第一校验信息设置为0Xac。这样,下位机在接收到第一数据包之后,可以利用与上位机预先协商的第一校验信息对第一数据包的检测结果字段中的检测信息进行验证,在检测信息的头部以及尾部均与第一校验信息相匹配的情况下,可以根据该检测信息执行相应的指令,否则,可以将接收的第一数据包丢弃,不进行任何处理。这样,可以保证检测结果传输的可靠性。
步骤S13,向下位机发送所述第一数据包,以使所述下位机根据所述第一数据包对当前场景进行图像采集。
在本公开实施例中,上位机在生成预设协议格式的第一数据包之后,可以向下位机发送第一数据包。这里,上位机与下位机可以通过多种方式连接,例如,可以通过串行接口连接,或者,可以通过无线方式连接。举例来说,树莓派可以通过串行接口与智能机器人的控制模块连接,树莓派可以通过串行接口将第一数据包发送给智能机器人的控制模块。
这里,下位机接收到第一数据包之后,可以通过对第一数据包的解析,由第一数据包的检测结果字段中获取检测信息,由第一数据包的控制字段获取控制信息,然后可以根据控制信息指示的工作模式以及检测结果指示的目标对象的位置,执行相应的操作, 例如,对目标对象进行追踪拍摄等。
图4示出根据本公开实施例的第一数据包格式的框图。在一个可能的实现方式中,第一数据包还可以包括校验字段。上述方法还可以包括:生成第二校验信息;将所述第二校验信息添加在所述第一数据包的校验字段中,其中,所述第二校验信息用于所述下位机对所述第一数据包的准确性进行验证。
在该实现方式中,第一数据包中可以包括校验字段,例如,校验字段可以是16个比特位。上位机可以生成第二校验信息,例如,利用随机数生成第二校验信息,然后可以利用第二校验信息为检测信息或者控制信息加密,并将第二校验信息添加在第一数据包的校验字段中。下位机在接收到第一数据包之后,可以利用校验字段中的第二校验信息为检测信息或者控制信息进行解密,在解密成功的情况下,可以根据得到的检测结果以及控制信息执行相应的操作,否则,可以丢弃接收到的第一数据包。通过在校验字段中携带第二校验信息,可以保证检测信息或者控制信息的准确性,避免被篡改的可能性。
在该实现方式的一个示例中,可以获取预设的生成多项式,基于所述生成多项式,生成二进制序列,基于所述检测结果以及所述二进制序列,生成所述第二校验信息。
在该示例中,为了保证信息通信过程中检测结果的准确性,可以针对检测结果,生成对检测结果进行校验的第二校验信息。这里的生成多项式可以与下位机预先协商,生成多项式可以是监督码序列,可以将生成多项式转换为二进制序列,二进制序列的位数可以为正整数,如8位、4位等。例如,生成多项式G(x)=x3+x2+1,二进制序列可以是将1101。然后可以利用检测结果D(x)以及生成多项式G(x),确定冗余码长R,然后将D(x)的二进制码向左移动R位,得到一个第一二进制码,然后将该第一二进制码除以G(x),得到余数r。然后将r的最后R位进行模2运算,得到第二二进制码,可以将第二二进制码重新赋值给r。然后将D(x)的二进制码向左移动R位后与r相加,可以得到第二校验信息。通过这种方式,可以得到对检测结果进行校验的第二校验信息,提高检测结果传输的准确性。
在一种可能的实现方式中,第一数据包包括模式标志位字段;上述方法还可以包括:根据采集所述图像帧时的工作模式,确定所述检测结果对应的工作模式;基于所述检测结果对应的工作模式,生成所述第一数据包的模式标志位字段。
在该实现方式中,第一数据包中可以包括模式标志位字段,该模式标志位字段可以指示检测结果对应的工作模式。例如,该模式标志位字段为1时,可以表示检测结果对应的工作模式是手势分类模式。上位机可以根据检测结果对应的工作模式生成存储在模式标志位字段的信息,然后将该信息封装在存储在模式标志位字段。下位机在接收到第一数据包之后,可以根据第一数据包中的模式标志位字段确定检测结果对应的工作模式,例如,确定当前的检测结果是在人脸检测模式下的人脸检测结果,下位机可以将该人脸检测结果保存在人脸检测模式对应的存储空间中。这样,通过模式标志位字段可以确定检测结果对应的工作模式,从而下位机可以更好地执行相应的操作。
在一种可能的实现方式中,在所述第一数据包的发送时间超过重传阈值,并且,在 所述发送时间内未接收所述下位机返回的确认信息的情况下,上位机可以再次向所述下位机发送所述第一数据包。
在该实现方式中,上位机可以将重传阈值存放在第一数据包的重传阈值字段,重传阈值可以根据实际的应用场景进行设置。上位机在发送第一数据包之后,可以计算第一数据包的发送时间。在该发送时间超过重传阈值的情况下,上位机未接收到下位机发送的针对第一数据包的返回的确认信息,可以认为存在下位机未接收到第一数据包或者第一数据包有误等问题,可以重新向下位机发送第一数据包。这样,可以确保第一数据包成功达到下位机,保证上位机与下位机之间的通信。
在一个可能的实现方式中,如图4所示,第一数据包还可以包括可选字段,该可选字段可以根据实际应用场景中第一数据包的通信协议格式进行设置,从而可以对第一数据包进行改进以及优化。
在一种可能的实现方式中,上位机可以接收下位机发送的第二数据包;根据所述第二数据包的控制字段携带的控制信息,对当前的工作模式进行调整。
在该实施方式中,下位机可以连接多个传感器,接收至少一个传感器传递的电信号,用户可以通过传感器设置当前的工作模式。下位机通过检测传感器的电信号,确定用户设置的工作模式。下位机可以直接由当前的工作模式生成控制信息,将该控制信息添加在第二数据包的控制字段中,或者,可以将加密后的控制信息添加在第二数据包的控制字段中,向上位机发送第二数据包。上位机接收第二数据包之后,可以在第二数据包的控制字段解析出当前的工作模式,并将自身的工作模式调整到解析出的工作模式,例如,树莓派根据智能机器人的控制模块传输的第二数据包,将工作模式由原来的人脸检测模式调整到球体检测模式。通过这种方式,可以实现上位机与下位机的双向通信。
需要说明的是,上位机还可以在第二数据包中获取下位机发送其他的一些信息,例如,在第二数据包中获取智能机器人运转的转速、速度等一些信息,从而上位机可以通过与下位机的双向通信,更好地了解智能机器人当前的运动状态。
图5示出根据本公开实施例的一种通信方法的流程图。该通信方法可以应用于下位机中,该方法可以包括以下步骤:
步骤S21,接收上位机发送的预设协议格式的第一数据包。
在本公开实施例中,下位机可以接收上位机发送的预设协议格式的第一数据包,这里,预设协议格式可以是TCP/IP协议格式。举例来说,智能机器人的控制模块(下位机)可以通过串行接口接收树莓派(上位机)发送的第一数据包。
步骤S22,基于所述第一数据包,得到对图像帧进行目标检测得到的检测结果以及当前的工作模式。
这里,下位机可以在第一数据包的检测结果字段获取对图像帧进行目标检测得到的检测结果,在第一数据包的控制字段中获取当前的工作模式。这里的工作模式包括手势分类模式、人脸检测模式、人体跟踪模式、球体检测模式中的一种或多种。
步骤S23,根据所述检测结果以及当前的工作模式对当前场景进行图像采集进行工 作。
这里,下位机可以根据检测结果确定目标对象的位置,该位置可以是目标对象的世界坐标或者图像坐标。然后,根据当前的工作模式以及检测结果指示的目标对象的位置,进行相应的图像采集进行工作,例如,对目标对象进行追踪拍摄等。通过这种方式,可以实现上位机和下位机的信息通信。
在一种可能的实现方式中,下位机可以在所述第一数据包的检测结果字段中获取检测信息,根据所述检测信息得到对图像帧进行目标检测得到的检测结果。相应地,下位机可以在所述第一数据包的控制字段中获取控制信息,根据所述控制信息确定当前工作模式。在该实现方式中,下位机可以直接由检测结果字段的检测信息得到目标对象的检测结果,或者,可以利用预先与上位机协商的方式将检测结果字段的检测信息进行解密,得到目标对象的检测结果。相应地,下位机可以直接由控制字段的控制信息得到当前的工作模式,或者,可以利用预先与上位机协商的方式将控制字段的控制信息进行解密,得到当前的工作模式。这样,可以保证第一数据包内容的准确性。
在一种可能的实现方式中,下位机可以在所述检测信息的头部和尾部获取第一校验信息,在所述第一校验信息匹配预设校验信息的情况下,在所述检测信息中提取所述检测结果。在该实现方式中,第一校验信息可以是上位机和下位机预先协商的,检验信息头部和尾部的第一校验信息可以相同,也可以不同。例如,可以将头部的第一校验信息设置为0X7e,将尾部的第一校验信息设置为0Xac。下位机在接收到第一数据包之后,可以利用与上位机预先协商的第一校验信息对第一数据包的检测结果字段中的检测信息进行验证,在检测信息的头部以及尾部均与第一校验信息相匹配的情况下,可以由该检测信息确定当前的工作模式。否则,可以将接收的第一数据包丢弃,不进行任何处理。这样,可以保证检测结果传输的可靠性。
在该实现方式的一个示例中,上位机可以在所述第一数据包的校验字段中,获取第二校验信息,并获取由预设的生成多项式生成的二进制序列。然后利用所述二进制序列对所述第二校验信息进行校验,得到校验结果,在所述校验结果为校验通过的情况下,在所述第一数据包中获取所述检测结果。
在该示例中,为了保证信息通信过程中检测结果的准确性,可以为该检测结果设置第二校验信息。第二校验信息可以携带在第一数据包的校验字段中。下位机可以获取预先存储的生成多项式,由该生成多项式生成的二进制序列,或者,直接获取存储的二进制序列。然后将第二校验信息除以二进制序列,得到余数,在余数是0的情况下,可以认为校验结果是校验通过。否则,可以认为校验结果是校验失败。在校验通过的情况下,可以由检测结果字段中获取检测结果,在校验失败的情况下,可以丢弃第一数据包。这样,下位机可以获取准确地检测结果,避免检测结果被篡改。
在一种可能的实现方式中,所述方法还包括:检测当前的工作模式;在所述工作模式发生改变的情况下,基于当前的工作模式修改所述第一数据包的控制字段,得到第二数据包;向上位机发送所述第二数据包。
在该实现方式中,下位机可以连接多个传感器,例如,触摸传感器、光感传感器、红外传感器等,接收至少一个传感器传递的电信号,用户可以通过传感器设置当前的工作模式。下位机通过检测传感器的电信号,确定用户设置的工作模式。下位机可以直接由当前的工作模式生成控制信息,将该控制信息添加在第二数据包的控制字段中,或者,可以将加密后的控制信息添加在第二数据包的控制字段中,向上位机发送第二数据包。从而上位机可以根据第二数据包中控制字段,调整当前的工作模式。这样,可以实现下位机到上位机的信息通信过程。
需要说明的是,下位机除了将当前的工作模式通过第二数据包的控制字段发送给上位机之后,还可以主动向上位机发送其他的一些信息,例如,将智能机器人运转的转速、速度等一些信息携带在第二数据包中发送给上位机。
通过本公开实施例提供的信息通信方案,实现上位机与下位机之间的信息通信。例如,实现树莓派(上位机)与智能机器人的控制模块(下位机)之间的信息通信。
结合乐高和树莓派搭建的教育机器人mindstorms-EV3,是当前编程教育和人工智能普及的一个新兴教具,其中,乐高和树莓派之间双向通信是最基础问题。相关技术中上下位机的通信方式包括利用状态寄存器,任务单元序列等方式。
上下位机通信技术在很多领域都有较为重要的作用,特别是在嵌入式设备中,完备的通信协议可以保证数据可靠高效地传输。但是要设计并实现一种完善统一的协议是比较困难的。首先,协议规范有依赖于相关的硬件接口,而上下位机设备及连接方式也是多种多样,无法设定统一标准。此外,为了保证数据传输的可靠性,需要借助校验机制和重传机制,但是重传和校验在一定程度上会降低数据传输实时性,所以需要根据不同的需求场景对协议进行修改。最后,协议设计还需要实现上下位机的双向交互。
本公开实施例通过设计树莓派和EV3通信协议,此协议可以解决树莓派和EV3的通信问题,主要包括以下步骤S31至步骤S36:
步骤S31:在树莓派上创建共享内存,用于存储标志位、图片及图片检测结果等信息。
其中,本公开实施例主应用领域为教育背景下的智能机器人,智能机器人可以实现手势分类,人脸检测和人体跟踪等功能,本公开实施例提供一种树莓派和乐高EV3的双向通信协议。在树莓派上完成图片的采集和不同功能的图片检测任务。为了能够实现图片存储、检测结果存储及不同功能切换,在树莓派上创建共享内存,共享内存主要信息格式如图2所示。
图2中共享内存信息格式主要包括三部分内容,标志位,图片内容和检测结果。其中标志位功能如下:标识当前采集得到的图片是否经过检测处理,标识不同检测功能模式;图片内容部分为图片存储区域,可以将采集得到的视频数据分帧后存储在该部分;检测结果部分存储图片检测信息,该部分内容大小为72Bytes,主要为了储存多目标检测结果信息,信息见图3。其中,标志位和图片内容每一帧不断更新,但是并不作为数据传输内容,而每一帧检测结果信息会封装到数据包中。
步骤S32:改变共享内存标志位,进行下一帧图片检测,并将检测结果信息封装为数据字段。
其中,可以输入共享内存中的检测结果部分,输出封装检测结果的数据包;基于树莓派共享内存中检测结果,将对应字段填写至指定部分以完成数据封装,数据包格式如图4所示。
在共享内存中同时保留有功能模式字段和检测结果信息字段,将检测结果信息直接封装到对应检测信息部分,为了保证检测数据传输可靠性,在检测结果头部和尾部一个字节都添加校验字节。其中头部校验字节可以为0X7e,尾部字节可以为0Xac。
EV3接收到数据包之后,会首先解析出检测结果字段,然后进行首尾字节信息的校验。校验通过时,根据检测结果执行相应指令;在校验失败时,会丢弃数据包,不进行任何处理。
步骤S33:根据数据字段计算CRC校验字段。
其中,为了保证传输结果的准确性,在数据包中增加CRC(Cyclic Redundancy Check,循环冗余校验)校验字段,该字段只针对检测结果进行校验,校验位共计16个比特信息。在EV3侧解析数据包时,同时进行CRC校验,得到检测结果序列,校验不通过时会丢弃数据包。
表1
种类 序号
手势分类 1
人脸检测 2
人体跟踪 3
球体检测 4
其中,教育机器人有不同工作模式,在不同工作模式下需要EV3和树莓派同时启动相应服务,服务的启动和切换需要通过控制字段的设定,服务及对应控制类型如上表1。在树莓派侧首先检测自身服务类型,根据服务种类补充控制字段内容。
此外,数据包格式中预留重传阈值字段,设定该时间阈值后,一旦数据包发送时间超过该阈值未收到相应ACK(Acknowledge character,确认字符)回复消息,那么会重新发送上述数据包。由于本教育机器人采用有线串口方式连接,丢包率极低,所以该字段为保留字段,留待无线场景需求。
在完成上述数据包数据信息封装后,树莓派将该数据包通过串口发送,该发送通过操作系统底层指令完成数据包发送。
步骤S35:EV3接收数据包,执行相应指令,完成校验,并通过触碰传感器修改控制字段。
其中,EV3可以完成两部分功能:接收并解析树莓派发送的数据包,修改数据包控制字段并将数据包发送到树莓派。
首先,在EV3侧收到数据包后,会首先进行CRC校验,在校验通过时会解析检测结果,并根据检测结果执行相应指令。CRC校验过程包括以下步骤S351至步骤S354:
步骤S351:解析数据包得到检测结果序列;
步骤S352:检测结果序列除以预设的生成多项式,得到余数;
步骤S353:余数为0,校验通过,检测结果正确;
步骤S354:余数不为0,校验失败,检测结果错误。
其次,当在EV3侧通过相关传感器修改功能模式时,如通过触碰传感器或者红外信标等方式,会修改数据包中的控制字段,并将该信息发送至树莓派侧,调整树莓派侧启动的服务,保证上下位机服务的一致性。
步骤S36:树莓派接收EV3控制字段信息,进行工作模式调整。
其中,树莓派侧接收到数据包后,首先完成CRC校验,在校验通过后,会解析控制字段,通过控制字段调整自身工作模式。此时树莓派共享内存格式保持不变,包括标志位、图片内容和检测结果三部分,但是检测结果对应于不同的功能下的检测信息。
本公开实施例通过设计树莓派和EV3通信协议中的数据字段和控制字段,可以完成数据信息和控制信息传输;再通过改进重传机制和和CRC校验方法,保证数据可靠高效传输;借助EV3的触碰传感器(触摸传感器),实现上下位机(例如树莓派和EV3)不同功能模式切换,完成教育机器人的不同工作模式,并可以保证数据信息一致性;树莓派和EV3通信协议预留其他可选的通信协议字段,可以应用到其他类似设备,并可以方便地进行改良和优化。
本公开实施例基于TCP/IP协议,兼容串口通信模式下的不同上下位机设备,对硬件设备弱依赖;现有技术常依赖于嵌入式设备类型。
本公开实施例可以同时实现更为灵活的上下位机双向信息交互机制,可以方便地实现下位机对上位机弱控制;相关技术大多只针对与上位机对下位机控制。
本公开实施例在树莓派和EV3通信协议中对数据类型进行划分,分为数据字段和控制字段两部分,可以提高数据传输可靠性。通过控制字段可以实现教育机器人不同模式切换;现有协议未对数据类型进行分类,较为固化。
本公开实施例对CRC校验方法进行改良,通过自定义循环码长度可以自由调整,实现可靠性和高效性的折衷;传统CRC方式通常固定循环码长度。
本公开实施例可以应用在教育机器人、半导体领域或者嵌入设备中:在教育机器人应用场景下,树莓派和EV3通信协议可以保证控制设备和执行设备之间双向可靠通信;在半导体领域或者嵌入式设备中,该算法可以提供灵活的双向交互机制;可以利用本公开实施例中改进CRC校验方案,提高通信效率。可以利用本公开实施例中提到共享内存方式,方便实现上位机中不同功能模式切换。
可以理解,本公开提及的上述各个方法实施例,在不违背原理逻辑的情况下,均可以彼此相互结合形成结合后的实施例,限于篇幅,本公开不再赘述。
此外,本公开还提供了装置、电子设备、计算机可读存储介质、程序,上述均可用 来实现本公开提供的任一种通信方法,相应技术方案和描述和参见方法部分的相应记载,不再赘述。
本领域技术人员可以理解,在实施方式的上述方法中,各步骤的撰写顺序并不意味着严格的执行顺序而对实施过程构成任何限定,各步骤的执行顺序应当以其功能和可能的内在逻辑确定。
图6示出根据本公开实施例的通信装置一示例的框图,如图6所示,所述装置包括:
获取模块31,配置为获取对图像帧进行目标检测得到的检测结果;
生成模块32,配置为基于所述检测结果以及当前的工作模式,生成预设协议格式的第一数据包;
发送模块33,配置为向下位机发送所述第一数据包,以使所述下位机根据所述第一数据包对当前场景进行图像采集。
在一种可能的实现方式中,所述获取模块31,配置为在共享内存中获取对图像帧进行目标检测得到的检测结果。
在一种可能的实现方式中,所述生成模块32,配置为根据所述检测结果生成检测信息;根据所述当前的工作模式生成控制信息;将所述检测信息添加在检测结果字段中,将所述控制信息添加在控制字段中,生成预设协议格式的所述第一数据包。
在一种可能的实现方式中,所述生成模块32,配置为在所述检测结果的头部和尾部添加第一校验信息,生成所述检测信息。
在一种可能的实现方式中,所述第一数据包包括校验字段;所述生成模块32还配置为生成第二校验信息;将所述第二校验信息添加在所述第一数据包的校验字段中,其中,所述第二校验信息配置为所述下位机对所述第一数据包的准确性进行验证。
在一种可能的实现方式中,所述生成模块32,配置为获取预设的生成多项式;基于所述生成多项式,生成二进制序列;基于所述检测结果以及所述二进制序列,生成所述第二校验信息。
在一种可能的实现方式中,所述第一数据包包括模式标志位字段;所述生成模块32还配置为根据采集所述图像帧时的工作模式,确定所述检测结果对应的工作模式;基于所述检测结果对应的工作模式,生成所述第一数据包的模式标志位字段。
在一种可能的实现方式中,所述发送模块33,还配置为在所述第一数据包的发送时间超过重传阈值,并且,在所述发送时间内未接收所述下位机返回的确认信息的情况下,再次向所述下位机发送所述第一数据包。
在一种可能的实现方式中,所述装置还包括:接收模块,配置为接收下位机发送的第二数据包;根据所述第二数据包的控制字段携带的控制信息,对当前的工作模式进行调整。
在一种可能的实现方式中,所述工作模式,包括以下至少一种:手势分类模式;人脸检测模式;人体跟踪模式;球体检测模式。
图7示出根据本公开实施例的通信装置一示例的框图,如图7所示,所述装置包括:
接收模块41,配置为接收上位机发送的预设协议格式的第一数据包;
确定模块42,配置为基于所述第一数据包,得到对图像帧进行目标检测得到的检测结果以及当前的工作模式;
控制模块43,配置为根据所述检测结果以及当前的工作模式对当前场景进行图像采集进行工作。
在一种可能的实现方式中,所述确定模块42,配置为在所述第一数据包的检测结果字段中获取检测信息;根据所述检测信息得到对图像帧进行目标检测得到的检测结果;在所述第一数据包的控制字段中获取控制信息;根据所述控制信息确定当前工作模式。
在一种可能的实现方式中,所述确定模块42,配置为在所述检测信息的头部和尾部获取第一校验信息;在所述第一校验信息匹配预设校验信息的情况下,在所述检测信息中提取所述检测结果。
在一种可能的实现方式中,所述确定模块42,配置为在所述第一数据包的校验字段中,获取第二校验信息;获取由预设的生成多项式生成的二进制序列;利用所述二进制序列对所述第二校验信息进行校验,得到校验结果;在所述校验结果为校验通过的情况下,在所述第一数据包中获取所述检测结果。
在一种可能的实现方式中,所述装置还包括:修改模块,配置为检测当前的工作模式;在所述工作模式发生改变的情况下,基于当前的工作模式修改所述第一数据包的控制字段,得到第二数据包;向上位机发送所述第二数据包。
在一种可能的实现方式中,所述工作模式包括以下至少一种:手势分类模式;人脸检测模式;人体跟踪模式;球体检测模式。
在一些实施例中,本公开实施例提供的装置具有的功能或包含的模块可以配置为执行上文方法实施例描述的方法,其实现可以参照上文方法实施例的描述,为了简洁,这里不再赘述。
本公开实施例还提出一种电子设备,包括:处理器;配置为存储处理器可执行指令的存储器;其中,所述处理器被配置为上述方法。
电子设备可以被提供为终端、服务器或其它形态的设备。
图8是根据一示例性实施例示出的一种电子设备1900的框图。例如,电子设备1900可以被提供为一服务器。参照图8,电子设备1900包括处理组件1922,其进一步包括一个或多个处理器,以及由存储器1932所代表的存储器资源,配置为存储可由处理组件1922的执行的指令,例如应用程序。存储器1932中存储的应用程序可以包括一个或一个以上的每一个对应于一组指令的模块。此外,处理组件1922被配置为执行指令,以执行上述方法。
电子设备1900还可以包括一个电源组件1926被配置为执行电子设备1900的电源管理,一个有线或无线网络接口1950被配置为将电子设备1900连接到网络,和一个输入输出(Input/Output,I/O)接口1958。电子设备1900可以操作基于存储在存储器1932的操作系统,例如Windows ServerTM,Mac OS XTM,UnixTM,LinuxTM,FreeBSDTM或 类似。
在示例性实施例中,还提供了一种非易失性计算机可读存储介质,例如包括计算机程序指令的存储器1932,上述计算机程序指令可由电子设备1900的处理组件1922执行以完成上述方法。
本公开可以是系统、方法和/或计算机程序产品。计算机程序产品可以包括计算机可读存储介质,其上载有用于使处理器实现本公开的各个方面的计算机可读程序指令。
计算机可读存储介质可以是可以保持和存储由指令执行设备使用的指令的有形设备。计算机可读存储介质例如可以但不限于是电存储设备、磁存储设备、光存储设备、电磁存储设备、半导体存储设备或者上述的任意合适的组合。计算机可读存储介质的例子(非穷举的列表)包括:便携式计算机盘、硬盘、随机存取存储器(Random Access Memory,RAM)、只读存储器(Read-Only Memory,ROM)、可擦式可编程只读存储器(Erasable Programmable Read-Only Memory,EPROM或闪存)、静态随机存取存储器(Static Random-Access Memory,SRAM)、便携式压缩盘只读存储器(Compact Disc Read-Only Memory,CD-ROM)、数字多功能盘(Digital Video Disc,DVD)、记忆棒、软盘、机械编码设备、例如其上存储有指令的打孔卡或凹槽内凸起结构、以及上述的任意合适的组合。这里所使用的计算机可读存储介质不被解释为瞬时信号本身,诸如无线电波或者其他自由传播的电磁波、通过波导或其他传输媒介传播的电磁波(例如,通过光纤电缆的光脉冲)、或者通过电线传输的电信号。
这里所描述的计算机可读程序指令可以从计算机可读存储介质下载到各个计算/处理设备,或者通过网络、例如因特网、局域网、广域网和/或无线网下载到外部计算机或外部存储设备。网络可以包括铜传输电缆、光纤传输、无线传输、路由器、防火墙、交换机、网关计算机和/或边缘服务器。每个计算/处理设备中的网络适配卡或者网络接口从网络接收计算机可读程序指令,并转发该计算机可读程序指令,以供存储在各个计算/处理设备中的计算机可读存储介质中。
用于执行本公开操作的计算机程序指令可以是汇编指令、指令集架构(Industry Standard Architecture,ISA)指令、机器指令、机器相关指令、微代码、固件指令、状态设置数据、或者以一种或多种编程语言的任意组合编写的源代码或目标代码,所述编程语言包括面向对象的编程语言—诸如Smalltalk、C++等,以及常规的过程式编程语言—诸如“C”语言或类似的编程语言。计算机可读程序指令可以完全地在用户计算机上执行、部分地在用户计算机上执行、作为一个独立的软件包执行、部分在用户计算机上部分在远程计算机上执行、或者完全在远程计算机或服务器上执行。在涉及远程计算机的情形中,远程计算机可以通过任意种类的网络—包括局域网(local area network,LAN)或广域网(Wide Area Network,WAN)—连接到用户计算机,或者,可以连接到外部计算机(例如利用因特网服务提供商来通过因特网连接)。在一些实施例中,通过利用计算机可读程序指令的状态信息来个性化定制电子电路,例如可编程逻辑电路、现场可编程门阵列(Field Programmable Gate Array,FPGA)或可编程逻辑阵列(programmable logic  array,PLA),该电子电路可以执行计算机可读程序指令,从而实现本公开的各个方面。
这里参照根据本公开实施例的方法、装置(系统)和计算机程序产品的流程图和/或框图描述了本公开的各个方面。应当理解,流程图和/或框图的每个方框以及流程图和/或框图中各方框的组合,都可以由计算机可读程序指令实现。
这些计算机可读程序指令可以提供给通用计算机、专用计算机或其它可编程数据处理装置的处理器,从而生产出一种机器,使得这些指令在通过计算机或其它可编程数据处理装置的处理器执行时,产生了实现流程图和/或框图中的一个或多个方框中规定的功能/动作的装置。也可以把这些计算机可读程序指令存储在计算机可读存储介质中,这些指令使得计算机、可编程数据处理装置和/或其他设备以特定方式工作,从而,存储有指令的计算机可读介质则包括一个制造品,其包括实现流程图和/或框图中的一个或多个方框中规定的功能/动作的各个方面的指令。
也可以把计算机可读程序指令加载到计算机、其它可编程数据处理装置、或其它设备上,使得在计算机、其它可编程数据处理装置或其它设备上执行一系列操作步骤,以产生计算机实现的过程,从而使得在计算机、其它可编程数据处理装置、或其它设备上执行的指令实现流程图和/或框图中的一个或多个方框中规定的功能/动作。
相应的,本公开实施例还提供一种计算机程序,包括计算机可读代码,当所述计算机可读代码在电子设备中运行时,所述电子设备中的处理器执行用于实现本公开实施例提供的任一通信方法。
附图中的流程图和框图显示了根据本公开的多个实施例的系统、方法和计算机程序产品的可能实现的体系架构、功能和操作。在这点上,流程图或框图中的每个方框可以代表一个模块、程序段或指令的一部分,所述模块、程序段或指令的一部分包含一个或多个用于实现规定的逻辑功能的可执行指令。在有些作为替换的实现中,方框中所标注的功能也可以以不同于附图中所标注的顺序发生。例如,两个连续的方框实际上可以基本并行地执行,它们有时也可以按相反的顺序执行,这依所涉及的功能而定。也要注意的是,框图和/或流程图中的每个方框、以及框图和/或流程图中的方框的组合,可以用执行规定的功能或动作的专用的基于硬件的系统来实现,或者可以用专用硬件与计算机指令的组合来实现。
以上已经描述了本公开的各实施例,上述说明是示例性的,并非穷尽性的,并且也不限于所披露的各实施例。在不偏离所说明的各实施例的范围和精神的情况下,对于本技术领域的普通技术人员来说许多修改和变更都是显而易见的。本文中所用术语的选择,旨在最好地解释各实施例的原理、实际应用或对市场中技术的技术改进,或者使本技术领域的其它普通技术人员能理解本文披露的各实施例。

Claims (35)

  1. 一种通信方法,所述方法包括:
    获取对图像帧进行目标检测得到的检测结果;
    基于所述检测结果以及当前的工作模式,生成预设协议格式的第一数据包;
    向下位机发送所述第一数据包,以使所述下位机根据所述第一数据包对当前场景进行图像采集。
  2. 根据权利要求1所述的方法,其中,所述获取对图像帧进行目标检测得到的检测结果,包括:在共享内存中获取对图像帧进行目标检测得到的检测结果。
  3. 根据权利要求1或2所述的方法,其中,所述基于所述检测结果以及当前的工作模式,生成预设协议格式的第一数据包,包括:根据所述检测结果生成检测信息;根据所述当前的工作模式生成控制信息;将所述检测信息添加在检测结果字段中,将所述控制信息添加在控制字段中,生成预设协议格式的所述第一数据包。
  4. 根据权利要求3所述的方法,其中,所述根据所述检测结果生成检测信息,包括:在所述检测结果的头部和尾部添加第一校验信息,生成所述检测信息。
  5. 根据权利要求1至4任意一项所述的方法,其中,所述第一数据包包括校验字段;所述方法还包括:生成第二校验信息;将所述第二校验信息添加在所述第一数据包的校验字段中,其中,所述第二校验信息用于所述下位机对所述第一数据包的准确性进行验证。
  6. 根据权利要求5所述的方法,其中,所述生成第二校验信息,包括:获取预设的生成多项式;基于所述生成多项式,生成二进制序列;基于所述检测结果以及所述二进制序列,生成所述第二校验信息。
  7. 根据权利要求1至6任意一项所述的方法,其中,所述第一数据包包括模式标志位字段;所述方法还包括:根据采集所述图像帧时的工作模式,确定所述检测结果对应的工作模式;基于所述检测结果对应的工作模式,生成所述第一数据包的模式标志位字段。
  8. 根据权利要求1至7任意一项所述的方法,其中,所述方法还包括:在所述第一数据包的发送时间超过重传阈值,并且,在所述发送时间内未接收所述下位机返回的确认信息的情况下,再次向所述下位机发送所述第一数据包。
  9. 根据权利要求1至8任意一项所述的方法,其中,所述方法还包括:接收下位机发送的第二数据包;根据所述第二数据包的控制字段携带的控制信息,对当前的工作模式进行调整。
  10. 根据权利要求1至9任意一项所述的方法,其中,所述工作模式,包括以下至少一种:手势分类模式;人脸检测模式;人体跟踪模式;球体检测模式。
  11. 一种通信方法,所述方法包括:
    接收上位机发送的预设协议格式的第一数据包;
    基于所述第一数据包,得到对图像帧进行目标检测得到的检测结果以及当前的工作模式;
    根据所述检测结果以及当前的工作模式对当前场景进行图像采集进行工作。
  12. 根据权利要求11所述的方法,其中,所述基于所述第一数据包,得到对图像帧进行目标检测得到的检测结果以及当前的工作模式,包括:在所述第一数据包的检测结果字段中获取检测信息;根据所述检测信息得到对图像帧进行目标检测得到的检测结果;在所述第一数据包的控制字段中获取控制信息;根据所述控制信息确定当前工作模式。
  13. 根据权利要求12所述的方法,其中,所述根据所述检测信息得到对图像帧进行目标检测得到的检测结果,包括:在所述检测信息的头部和尾部获取第一校验信息;在所述第一校验信息匹配预设校验信息的情况下,在所述检测信息中提取所述检测结果。
  14. 根据权利要求12或13所述的方法,其中,所述在所述第一数据包的检测结果字段中获取检测信息,包括:在所述第一数据包的校验字段中,获取第二校验信息;获取由预设的生成多项式生成的二进制序列;利用所述二进制序列对所述第二校验信息进行校验,得到校验结果;在所述校验结果为校验通过的情况下,在所述第一数据包中获取所述检测结果。
  15. 根据权利要求11至14任意一项所述的方法,其中,所述方法还包括:检测当前的工作模式;在所述工作模式发生改变的情况下,基于当前的工作模式修改所述第一数据包的控制字段,得到第二数据包;向上位机发送所述第二数据包。
  16. 根据权利要求11至15任意一项所述的方法,其中,所述工作模式包括以下至少一种:手势分类模式;人脸检测模式;人体跟踪模式;球体检测模式。
  17. 一种通信装置,所述装置包括:
    获取模块,配置为获取对图像帧进行目标检测得到的检测结果;
    生成模块,配置为基于所述检测结果以及当前的工作模式,生成预设协议格式的第一数据包;
    发送模块,配置为向下位机发送所述第一数据包,以使所述下位机根据所述第一数据包对当前场景进行图像采集。
  18. 根据权利要求17所述的装置,其中,所述获取模块,配置为在共享内存中获取对图像帧进行目标检测得到的检测结果。
  19. 根据权利要求17或18所述的装置,其中,所述生成模块,配置为根据所述检测结果生成检测信息;根据所述当前的工作模式生成控制信息;将所述检测信息添加在检测结果字段中,将所述控制信息添加在控制字段中,生成预设协议格式的所述第一数据包。
  20. 根据权利要求19所述的装置,其中,所述生成模块,配置为在所述检测结果的头部和尾部添加第一校验信息,生成所述检测信息。
  21. 根据权利要求17至20中任一项所述的装置,其中,所述第一数据包包括校验字段;所述生成模块,还配置为生成第二校验信息;将所述第二校验信息添加在所述第一数据包的校验字段中,其中,所述第二校验信息配置为所述下位机对所述第一数据包的准确性进行验证。
  22. 根据权利要求21所述的装置,其中,所述生成模块,配置为获取预设的生成多项式;基于所述生成多项式,生成二进制序列;基于所述检测结果以及所述二进制序列,生成所述第二校验信息。
  23. 根据权利要求17至22中任一项所述的装置,其中,所述第一数据包包括模式标志位字段;所述生成模块还配置为根据采集所述图像帧时的工作模式,确定所述检测结果对应的工作模式;基于所述检测结果对应的工作模式,生成所述第一数据包的模式标志位字段。
  24. 根据权利要求17至23中任一项所述的装置,其中,所述发送模块,还配置为在所述第一数据包的发送时间超过重传阈值,并且,在所述发送时间内未接收所述下位机返回的确认信息的情况下,再次向所述下位机发送所述第一数据包。
  25. 根据权利要求17至24中任一项所述的装置,其中,所述装置还包括:接收模块,配置为接收下位机发送的第二数据包;根据所述第二数据包的控制字段携带的控制信息,对当前的工作模式进行调整。
  26. 根据权利要求17至25中任一项所述的装置,其中,所述工作模式,包括以下至少一种:手势分类模式;人脸检测模式;人体跟踪模式;球体检测模式。
  27. 一种通信装置,所述装置包括:
    接收模块,配置为接收上位机发送的预设协议格式的第一数据包;
    确定模块,配置为基于所述第一数据包,得到对图像帧进行目标检测得到的检测结果以及当前的工作模式;
    控制模块,配置为根据所述检测结果以及当前的工作模式对当前场景进行图像采集进行工作。
  28. 根据权利要求27所述的装置,其中,所述确定模块,配置为在所述第一数据包的检测结果字段中获取检测信息;根据所述检测信息得到对图像帧进行目标检测得到的检测结果;在所述第一数据包的控制字段中获取控制信息;根据所述控制信息确定当前工作模式。
  29. 根据权利要求28所述的装置,其中,所述确定模块,配置为在所述检测信息的头部和尾部获取第一校验信息;在所述第一校验信息匹配预设校验信息的情况下,在所述检测信息中提取所述检测结果。
  30. 根据权利要求28或29所述的装置,其中,所述确定模块,配置为在所述第一数据包的校验字段中,获取第二校验信息;获取由预设的生成多项式生成的二进制序列;利用所述二进制序列对所述第二校验信息进行校验,得到校验结果;在所述校验结果为校验通过的情况下,在所述第一数据包中获取所述检测结果。
  31. 根据权利要求27至30中任一项所述的装置,其中,所述装置还包括:修改模块,配置为检测当前的工作模式;在所述工作模式发生改变的情况下,基于当前的工作模式修改所述第一数据包的控制字段,得到第二数据包;向上位机发送所述第二数据包。
  32. 根据权利要求27至31中任一项所述的装置,其中,所述工作模式包括以下至少一种:手势分类模式;人脸检测模式;人体跟踪模式;球体检测模式。
  33. 一种电子设备,包括:处理器;用于存储处理器可执行指令的存储器;
    其中,所述处理器被配置为调用所述存储器存储的指令,以执行权利要求1至10中任意一项所述的方法,或者,以执行权利要求11至16所述的方法。
  34. 一种计算机可读存储介质,其上存储有计算机程序指令,所述计算机程序指令被处理器执行时实现权利要求1至10中任意一项所述的方法,或者,实现权利要求11至16所述的方法。
  35. 一种计算机程序,包括计算机可读代码,当所述计算机可读代码在电子设备中运行时,所述电子设备中的处理器执行用于实现权利要求1-10中任一项所述的通信方法,或者权利要求11至16所述的通信方法。
PCT/CN2020/095340 2019-08-29 2020-06-10 通信方法及装置、电子设备和存储介质 WO2021036407A1 (zh)

Priority Applications (4)

Application Number Priority Date Filing Date Title
KR1020217016118A KR20210086678A (ko) 2019-08-29 2020-06-10 통신 방법 및 장치, 전자 기기 및 저장 매체
JP2021531028A JP2022509292A (ja) 2019-08-29 2020-06-10 通信方法および装置、電子機器並びに記憶媒体
SG11202105681QA SG11202105681QA (en) 2019-08-29 2020-06-10 Communication method and apparatus, electronic device, and storage medium
US17/336,957 US20210294767A1 (en) 2019-08-29 2021-06-02 Communication method and device, electronic device and storage medium

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201910809368.5 2019-08-29
CN201910809368.5A CN110545376B (zh) 2019-08-29 2019-08-29 通信方法及装置、电子设备和存储介质

Related Child Applications (1)

Application Number Title Priority Date Filing Date
US17/336,957 Continuation US20210294767A1 (en) 2019-08-29 2021-06-02 Communication method and device, electronic device and storage medium

Publications (1)

Publication Number Publication Date
WO2021036407A1 true WO2021036407A1 (zh) 2021-03-04

Family

ID=68710834

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2020/095340 WO2021036407A1 (zh) 2019-08-29 2020-06-10 通信方法及装置、电子设备和存储介质

Country Status (7)

Country Link
US (1) US20210294767A1 (zh)
JP (1) JP2022509292A (zh)
KR (1) KR20210086678A (zh)
CN (1) CN110545376B (zh)
SG (1) SG11202105681QA (zh)
TW (1) TWI737460B (zh)
WO (1) WO2021036407A1 (zh)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114465888A (zh) * 2021-12-23 2022-05-10 珠海格力电器股份有限公司 配置数据协议的采集方法、电子设备及存储介质
WO2023029386A1 (zh) * 2021-09-02 2023-03-09 上海商汤智能科技有限公司 通信方法及装置、电子设备、存储介质和计算机程序

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110545376B (zh) * 2019-08-29 2021-06-25 上海商汤智能科技有限公司 通信方法及装置、电子设备和存储介质
CN115334331B (zh) * 2022-08-23 2023-09-22 苏州青颖飞帆软件科技股份有限公司 一种教学直播的通讯方法、设备及存储介质
CN115861033A (zh) * 2022-12-20 2023-03-28 北京远舢智能科技有限公司 一种图像数据处理方法、装置、计算机设备及存储介质

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105391780A (zh) * 2015-11-09 2016-03-09 重庆川仪自动化股份有限公司 一种数据采集和接收的方法及系统
CN106603581A (zh) * 2017-02-22 2017-04-26 欣旺达电子股份有限公司 支持多种通信协议的测试方法及装置
CN107623726A (zh) * 2017-08-29 2018-01-23 美的智慧家居科技有限公司 数据转换传输方法和装置
CN207910927U (zh) * 2018-02-13 2018-09-25 深圳市辰卓电子有限公司 一种信息采集桥接装置及图像传感器质量自动检测设备
CN209105343U (zh) * 2018-12-10 2019-07-12 美钻深海能源科技研发(上海)有限公司 水下履带智能机器人图像采集单元
CN110545376A (zh) * 2019-08-29 2019-12-06 上海商汤智能科技有限公司 通信方法及装置、电子设备和存储介质

Family Cites Families (22)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2002281487A (ja) * 2001-03-19 2002-09-27 Fujitsu General Ltd ネットワークカメラによる監視方法と監視システム
JP4284609B2 (ja) * 2003-03-27 2009-06-24 ソニー株式会社 ロボット装置及びロボット装置の制御方法
JP4662496B2 (ja) * 2005-02-03 2011-03-30 富士通株式会社 無線通信システムおよび無線通信方法
US7899557B2 (en) * 2005-03-01 2011-03-01 Asm Japan K.K. Input signal analyzing system and control apparatus using same
JP2007243663A (ja) * 2006-03-09 2007-09-20 Matsushita Electric Ind Co Ltd データ送受信装置
JP4279345B1 (ja) * 2008-09-16 2009-06-17 株式会社 水口研究所 プログラマブル・トグルスイッチを持つデジタル画像処理コンピュータシステム
JP5276538B2 (ja) * 2009-07-22 2013-08-28 富士フイルム株式会社 Af枠自動追尾システム
WO2011091604A1 (zh) * 2010-01-29 2011-08-04 华为终端有限公司 视频通信的方法、装置和系统
JP5703801B2 (ja) * 2011-02-04 2015-04-22 富士通株式会社 ロボット、位置推定方法及びプログラム
JP6245886B2 (ja) * 2013-08-08 2017-12-13 キヤノン株式会社 画像撮像方法及び画像撮像装置
US20160306036A1 (en) * 2013-12-03 2016-10-20 Edh Us Llc Systems and methods to track a golf ball to and on a putting green
JP6126028B2 (ja) * 2014-02-28 2017-05-10 三井不動産株式会社 ロボット制御システム、ロボット制御サーバ及びロボット制御プログラム
CN104243918A (zh) * 2014-09-03 2014-12-24 深圳奇沃智联科技有限公司 应用蓝牙定位进行自动巡逻之机器人监控系统
US20160085518A1 (en) * 2014-09-21 2016-03-24 Jang Hee I Systems and methods for imaging and generation of executable processor instructions based on ordered objects
JP6551507B2 (ja) * 2015-02-17 2019-07-31 日本電気株式会社 ロボット制御装置、ロボット、ロボット制御方法およびプログラム
CN106034199B (zh) * 2015-03-18 2019-07-05 中国科学院苏州纳米技术与纳米仿生研究所 一种模拟数据源的图像采集装置和方法
CN105391939B (zh) * 2015-11-04 2017-09-29 腾讯科技(深圳)有限公司 无人机拍摄控制方法和装置、无人机拍摄方法和无人机
JP2017100242A (ja) * 2015-12-02 2017-06-08 グローリー株式会社 検査ロボットシステム
CN205721829U (zh) * 2016-03-07 2016-11-23 谭圆圆 一种无人飞行器
JP2018113649A (ja) * 2017-01-13 2018-07-19 キヤノン株式会社 カメラ、情報処理装置及びシステム
CN108712609A (zh) * 2018-05-17 2018-10-26 Oppo广东移动通信有限公司 对焦处理方法、装置、设备及存储介质
CN110070511B (zh) * 2019-04-30 2022-01-28 北京市商汤科技开发有限公司 图像处理方法和装置、电子设备及存储介质

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105391780A (zh) * 2015-11-09 2016-03-09 重庆川仪自动化股份有限公司 一种数据采集和接收的方法及系统
CN106603581A (zh) * 2017-02-22 2017-04-26 欣旺达电子股份有限公司 支持多种通信协议的测试方法及装置
CN107623726A (zh) * 2017-08-29 2018-01-23 美的智慧家居科技有限公司 数据转换传输方法和装置
CN207910927U (zh) * 2018-02-13 2018-09-25 深圳市辰卓电子有限公司 一种信息采集桥接装置及图像传感器质量自动检测设备
CN209105343U (zh) * 2018-12-10 2019-07-12 美钻深海能源科技研发(上海)有限公司 水下履带智能机器人图像采集单元
CN110545376A (zh) * 2019-08-29 2019-12-06 上海商汤智能科技有限公司 通信方法及装置、电子设备和存储介质

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2023029386A1 (zh) * 2021-09-02 2023-03-09 上海商汤智能科技有限公司 通信方法及装置、电子设备、存储介质和计算机程序
CN114465888A (zh) * 2021-12-23 2022-05-10 珠海格力电器股份有限公司 配置数据协议的采集方法、电子设备及存储介质

Also Published As

Publication number Publication date
CN110545376B (zh) 2021-06-25
JP2022509292A (ja) 2022-01-20
CN110545376A (zh) 2019-12-06
KR20210086678A (ko) 2021-07-08
SG11202105681QA (en) 2021-06-29
TW202109352A (zh) 2021-03-01
TWI737460B (zh) 2021-08-21
US20210294767A1 (en) 2021-09-23

Similar Documents

Publication Publication Date Title
WO2021036407A1 (zh) 通信方法及装置、电子设备和存储介质
CN107786794B (zh) 向应用提供由图像传感器获取的图像的电子装置和方法
WO2016101288A1 (zh) 一种远程直接数据存取方法、设备和系统
KR20190098752A (ko) 블록체인 기반 데이터 프로세싱 방법 및 디바이스
BR112019008775B1 (pt) Método de processamento de dados
US20150134840A1 (en) Application streaming service
US20200334184A1 (en) Offloading data movement for packet processing in a network interface controller
CN104021069A (zh) 基于分布式虚拟机系统的软件性能测试的管理方法和系统
BR112019008903A2 (pt) método e dispositivo para geração de pacotes de unidade de dados de protocolo (pdu)
CN116866336A (zh) 一种进行远程协助的方法与设备
CN106878199A (zh) 一种接入信息的配置方法和装置
WO2019057089A1 (zh) 网卡镜像抓包方法、终端以及可读存储介质
WO2018214168A1 (zh) 数据传输方法和装置
WO2021233215A1 (zh) 图像处理方法及装置
JP2020039115A (ja) インテリジェント運転自動車のデータ伝送方法、装置及びデバイス
US9660967B1 (en) Big data markers for stream labeling, identification and decoding
CN108124157B (zh) 信息交互方法、装置及系统
KR20230154979A (ko) 렌더링 엔진들을 갖는 몰입형 기술 미디어 포맷(itmf) 사양의 맵핑 아키텍처
US20170279639A1 (en) Bridge port extender
CN116996309A (zh) 基于区块链的语义通信方法及系统、存储介质、设备
CN112925297A (zh) 自动驾驶算法验证方法、装置、设备、存储介质及产品
US11283451B1 (en) Bridged integrated circuits
US20220303642A1 (en) Securing video distribution
CN115002087A (zh) 一种音视频数据传输方法、系统、装置及存储介质
Lu et al. ViMediaNet: an emulation system for interactive multimedia based telepresence services

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 20856790

Country of ref document: EP

Kind code of ref document: A1

ENP Entry into the national phase

Ref document number: 20217016118

Country of ref document: KR

Kind code of ref document: A

ENP Entry into the national phase

Ref document number: 2021531028

Country of ref document: JP

Kind code of ref document: A

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 20856790

Country of ref document: EP

Kind code of ref document: A1

122 Ep: pct application non-entry in european phase

Ref document number: 20856790

Country of ref document: EP

Kind code of ref document: A1

32PN Ep: public notification in the ep bulletin as address of the adressee cannot be established

Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205A DATED 10-05-2023)

122 Ep: pct application non-entry in european phase

Ref document number: 20856790

Country of ref document: EP

Kind code of ref document: A1