CN108289165B - Method and device for realizing camera control based on mobile phone and terminal equipment - Google Patents

Method and device for realizing camera control based on mobile phone and terminal equipment Download PDF

Info

Publication number
CN108289165B
CN108289165B CN201711317560.XA CN201711317560A CN108289165B CN 108289165 B CN108289165 B CN 108289165B CN 201711317560 A CN201711317560 A CN 201711317560A CN 108289165 B CN108289165 B CN 108289165B
Authority
CN
China
Prior art keywords
request data
data
processing result
camera
server
Prior art date
Legal status (The legal status 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 status listed.)
Active
Application number
CN201711317560.XA
Other languages
Chinese (zh)
Other versions
CN108289165A (en
Inventor
黄华聪
余旭
高路房
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenzhen Evomotion Co ltd
Original Assignee
Shenzhen Evomotion Co ltd
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 Shenzhen Evomotion Co ltd filed Critical Shenzhen Evomotion Co ltd
Priority to CN201711317560.XA priority Critical patent/CN108289165B/en
Publication of CN108289165A publication Critical patent/CN108289165A/en
Application granted granted Critical
Publication of CN108289165B publication Critical patent/CN108289165B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • 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
    • H04N23/661Transmitting camera control signals through networks, e.g. control via the Internet
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04MTELEPHONIC COMMUNICATION
    • H04M1/00Substation equipment, e.g. for use by subscribers
    • H04M1/72Mobile telephones; Cordless telephones, i.e. devices for establishing wireless links to base stations without route selection
    • H04M1/724User interfaces specially adapted for cordless or mobile telephones
    • H04M1/72403User interfaces specially adapted for cordless or mobile telephones with means for local support of applications that increase the functionality
    • H04M1/72409User interfaces specially adapted for cordless or mobile telephones with means for local support of applications that increase the functionality by interfacing with external accessories
    • H04M1/72415User interfaces specially adapted for cordless or mobile telephones with means for local support of applications that increase the functionality by interfacing with external accessories for remote control of appliances

Abstract

The invention is suitable for the technical field of remote control, and provides a control method, a control device and terminal equipment of a camera, wherein the control method, the control device and the terminal equipment comprise the following steps: receiving request data sent by a mobile terminal through a preset server loaded by the camera; receiving the request data from the preset server through the sub-process of the camera, and performing first preprocessing on the received request data; receiving first preprocessed request data from the subprocess through a main process of the camera, executing a processing task contained in the request data, and generating first processing result data; and acquiring the first processing result data from the main process through the sub-process, performing second preprocessing on the first processing result data to acquire second processing result data, and sending the second processing result data to the mobile terminal through the preset server. The method ensures that the communication connection is more stable and the data transmission is more reliable.

Description

Method and device for realizing camera control based on mobile phone and terminal equipment
Technical Field
The invention belongs to the technical field of remote control, and particularly relates to a camera control method, a camera control device and terminal equipment.
Background
With the development of mobile communication technology, the interactive application of mobile phones and other electronic devices is becoming more and more widespread. The interaction mode is very common in which a camera is used as a server and a mobile phone is used as a client.
However, the existing interaction mode of the mobile phone and the camera has the problems of unstable connection and easy data loss, so that the stability and the reliability of the interaction process of the mobile phone and the camera are poor.
Disclosure of Invention
In view of this, embodiments of the present invention provide a camera control method, a camera control apparatus, and a terminal device, so as to solve the problems of poor stability and low reliability of interaction between a mobile phone and a camera in the prior art.
A first aspect of an embodiment of the present invention provides a camera control method, including:
receiving request data sent by a mobile terminal through a preset server loaded by the camera;
receiving the request data from the preset server through the sub-process of the camera, and performing first preprocessing on the received request data;
receiving first preprocessed request data from the subprocess through a main process of the camera, executing a processing task contained in the request data, and generating first processing result data;
and acquiring the first processing result data from the main process through the sub-process, performing second preprocessing on the first processing result data to acquire second processing result data, and sending the second processing result data to the mobile terminal through the preset server.
A second aspect of an embodiment of the present invention provides a control apparatus for a camera, including:
the receiving unit is used for receiving request data sent by the mobile terminal through a preset server loaded by the camera;
the first preprocessing unit is used for receiving the request data from the preset server through the sub-process of the camera and performing first preprocessing on the received request data;
a first execution unit, configured to receive, by a main process of the camera, first preprocessed request data from the sub-process, execute a processing task included in the request data, and generate first processing result data;
and the second preprocessing unit is used for acquiring the first processing result data from the main process through the sub-process, performing second preprocessing on the first processing result data to acquire second processing result data, and sending the second processing result data to the mobile terminal through the preset server.
A third aspect of the present embodiment provides a terminal device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, where the processor implements the steps of the method provided in the first aspect of the present embodiment when executing the computer program.
A fourth aspect of embodiments of the present invention provides a computer-readable storage medium storing a computer program which, when executed by one or more processors, performs the steps of the method provided by the first aspect of embodiments of the present invention.
Compared with the prior art, the embodiment of the invention has the following beneficial effects:
the method comprises the steps that a preset server loaded by a camera receives request data sent by a mobile terminal; receiving the request data from the preset server through the sub-process of the camera, and performing first preprocessing on the received request data; receiving first preprocessed request data from the subprocess through a main process of the camera, executing a processing task contained in the request data, and generating first processing result data; and acquiring the first processing result data from the main process through the sub-process, performing second preprocessing on the first processing result data to acquire second processing result data, and sending the second processing result data to the mobile terminal through the preset server. The stability and reliability of interaction between the mobile phone and the camera are greatly improved.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings needed to be used in the embodiments or the prior art descriptions will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without inventive exercise.
Fig. 1 is a schematic diagram of a control method of a camera according to an embodiment of the present invention;
fig. 2 is a schematic flow chart of an implementation of a control method of a camera according to an embodiment of the present invention;
fig. 3 is a schematic flow chart of an implementation of a control method of a camera according to an embodiment of the present invention;
fig. 4 is a flowchart illustrating an implementation process of a camera control method according to an embodiment of the present invention;
fig. 5 is a schematic diagram of a control device of a camera according to an embodiment of the present invention;
fig. 6 is a schematic diagram of a terminal device according to an embodiment of the present invention.
Detailed Description
In the following description, for purposes of explanation and not limitation, specific details are set forth, such as particular system structures, techniques, etc. in order to provide a thorough understanding of the embodiments of the invention. It will be apparent, however, to one skilled in the art that the present invention may be practiced in other embodiments that depart from these specific details. In other instances, detailed descriptions of well-known systems, devices, circuits, and methods are omitted so as not to obscure the description of the present invention with unnecessary detail.
It will be understood that the terms "comprises" and/or "comprising," when used in this specification and the appended claims, specify the presence of stated features, integers, steps, operations, elements, and/or components, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and/or groups thereof.
It is also to be understood that the terminology used in the description of the invention herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the invention. As used in the specification of the present invention and the appended claims, the singular forms "a," "an," and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise.
It should be further understood that the term "and/or" as used in this specification and the appended claims refers to and includes any and all possible combinations of one or more of the associated listed items.
As used in this specification and the appended claims, the term "if" may be interpreted contextually as "when", "upon" or "in response to a determination" or "in response to a detection". Similarly, the phrase "if it is determined" or "if a [ described condition or event ] is detected" may be interpreted contextually to mean "upon determining" or "in response to determining" or "upon detecting [ described condition or event ]" or "in response to detecting [ described condition or event ]".
In order to explain the technical means of the present invention, the following description will be given by way of specific examples.
Fig. 1 is an overall block diagram of a control method of a camera according to an embodiment of the present invention, and only a part related to the embodiment of the present invention is shown for convenience of description. As shown, the camera includes:
the system comprises an HTTP server, a control command analysis process, a thumbnail acquisition process, a long connection process, a file management process, a wifi communication application layer and an RTSP server.
The HTTP server comprises an Nginx server and spawn-fcgi. The control command analysis process, the thumbnail acquisition process, the long connection process and the file management process belong to sub-processes. The Wifi communication application layer belongs to a main process.
The Nginx server can be communicated with the mobile phone and used for receiving the request data sent by the mobile phone. And the Nginx server is in communication connection with the spawn-fcgi through a Socket to realize data interaction. The Nginx server is a stable, open-source and high-performance webpage server, and the span-fcgi is a process management tool which can simultaneously manage a plurality of sub-processes, such as a control command analysis process, a thumbnail acquisition process, a long connection process and a file management process, so as to realize asynchronous operation. And the Spawn-fcgi is in communication connection with each subprocess through a local Socket to realize data interaction. And each subprocess carries out command analysis and data conversion on the acquired request data and sends the request data to the wifi communication application layer. And the wifi application layer performs corresponding processing according to the request data and returns a processing result to the Nginx server through the sub-process. And the Nginx server returns the processing result to the mobile phone.
The RTSP server can communicate with the mobile phone and is used for receiving a wifi preview request sent by the mobile phone and sending the request to the wifi application layer. And the Wifi application layer processes according to the request and returns the processing result to the mobile phone through the RTSP server.
For the processing procedure of each server/process in the camera on the request data sent by the mobile phone, reference may be specifically made to the relevant description of the embodiments corresponding to fig. 2, fig. 3, and fig. 4.
The existing control method of the camera provides a unique control protocol of the camera by utilizing a private protocol layer in the camera, and realizes data interaction with a mobile phone. The private protocol layer in the camera is in communication link with the mobile phone through a link layer Socket. However, the link layer Socket connection is unstable and easy to disconnect, so that packet loss and errors often occur in data transmission. The implementation of the invention is to communicate with the mobile phone through the Nginx server and utilize the spawn-fcig multi-process management tool to enable each sub-process to receive the request data sent by the mobile phone, so that the communication between the mobile phone and the camera is more stable and the data transmission is more reliable.
Fig. 2 is a schematic implementation flow diagram of a camera control method provided in an embodiment of the present invention, and as shown in the figure, the method may include the following steps:
step S201, receiving request data sent by the mobile terminal through a preset server loaded by the camera.
Wherein, predetermine the server and include: HTTP server, RTSP server. The HTTP server comprises a Nginx server and a management process of a sub-process. The Nginx server is a high-performance HTTP and reverse proxy server, is also an IMAP/POP3/SMTP server, and is characterized by small memory occupation and strong concurrency capability. The management process for the sub-process may be spawn-fcgi. RTSP (Real-Time streaming Protocol) is a text-based application layer Protocol, and an RTSP server is used for data streaming between a camera and a mobile phone.
The mobile terminal can be a mobile device such as a mobile phone, an IPAD, a notebook computer and the like which can perform communication interaction with the camera. In practical application, a preset APP is required to be installed on the mobile terminal, so that the mobile terminal controls the camera through the preset APP.
Illustratively, as shown in fig. 1, a Nginx server receives a request sent by a handset, and a span-fcgi is in communication connection with the Nginx server through a Socket to receive the request sent by the handset through the Nginx server (two programs on the network realize data exchange through a bidirectional communication connection, and one end of the connection is called a Socket).
Step S202, receiving the request data from the preset server through the sub-process of the camera, and performing first preprocessing on the received request data.
Wherein the sub-process comprises: the control command analysis subprocess, the thumbnail acquisition subprocess, the long connection subprocess and the file management subprocess.
In practical application, as shown in fig. 1, a sub-process is connected to a management process of the sub-process in a preset server through a FastCGI channel, the sub-process monitors a request in the management process through the FastCGI channel, and once the request is monitored, the sub-process receives the request data.
Optionally, the performing the first preprocessing on the received request data includes:
analyzing the received request data through a sub-process corresponding to the request data, and packaging the analyzed request data into a communication message;
and converting the communication message into a data structure format.
In practical application, request data sent by a mobile phone is http data, the http data is in a JSON format, and a camera host process cannot recognize the JSON format data, so that the JSON format data needs to be converted into data structure format data which can be recognized by the camera host process. As shown in fig. 1, the sub-process performs command parsing on the monitored request data, converts the parsed request data from the JSON format into the data structure format through communication data conversion, and sends the converted request data to the wifi communication application layer.
As another embodiment of the present application, after receiving the request data from the preset server through the sub-process of the camera, the method further includes:
judging whether the received request data is file management request data;
and if the received request data is not the file management request data, performing first preprocessing on the received request data.
Illustratively, it is determined whether the received request data is file management request data; if the received request data is not file management request data, the received request data may be control command request data, file thumbnail acquisition request data, long connection request data;
if the received request data is control command request data, the control command analysis subprocess monitors a control command request connection, acquires data carried by the request connection, analyzes the control command and parameter information from the data, packages the analyzed control command and parameter information into a communication message, and converts the communication message into a data structure body format;
if the received request data is request data for acquiring the file thumbnail, the thumbnail acquiring subprocess monitors a request connection for acquiring the file thumbnail, acquires data carried by the request connection, analyzes a command for acquiring the file thumbnail from the data, packages the analyzed command for acquiring the file thumbnail into a communication message, and converts the communication message into a data structure format;
if the received request data is long connection request data, the long connection subprocess monitors a request connection of the long connection, acquires data carried by the request connection, analyzes a long connection command from the data, packages the analyzed long connection command into a communication message, and converts the communication message into a data structure format.
Step S203, receiving the first preprocessed request data from the sub-process through the main process of the camera, executing a processing task included in the request data, and generating first processing result data.
Wherein the host process may be a wifi communication application layer of the camera, as shown in fig. 1. The first processing result data can be result data obtained after the main process processes the request data sent by the sub-process; in contrast, the second processing result data may be result data obtained by the sub-process performing processing according to the monitored request data. It should be noted that the "first" and "second" are merely used to distinguish the generation subjects of the processing result data, and are not used as a count, in other words, the first processing result data is generated by the main process, and the second processing result data is generated by the sub-process.
Illustratively, if the main process receives the control command and the parameter information sent by the control command analysis sub-process, the main process executes the relevant operation according to the control command and the parameter information;
if the main process receives a command for acquiring the thumbnail of the file sent by the thumbnail acquiring subprocess, the thumbnail of the corresponding image is processed according to the command;
and if the main process receives the command sent by the long connection subprocess, continuously sending data to the mobile phone according to the command (at the moment, the long connection subprocess does not release the connection with the management process).
In practical application, a subprocess needs to initiate a connection request with a main process, and if the connection is successful, the main process receives request data from the subprocess; if the connection fails, the sub-process re-initiates a connection request with the main process; if the failure occurs 5 times in succession, the child process listens again to the request in the management process via the FastCGI channel.
Step S204, the first processing result data is obtained from the main process through the sub-process, second preprocessing is carried out on the first processing result data to obtain second processing result data, and the second processing result data is sent to the mobile terminal through the preset server.
Wherein, the second preprocessing is performed on the first processing result data to obtain second processing result data, and the method comprises the following steps:
and converting the first processing result data into a JSON format.
The embodiment of the invention receives the request data sent by the mobile terminal through the preset server loaded by the camera; receiving the request data from the preset server through the sub-process of the camera, and performing first preprocessing on the received request data; receiving first preprocessed request data from the subprocess through a main process of the camera, executing a processing task contained in the request data, and generating first processing result data; and acquiring the first processing result data from the main process through the sub-process, performing second preprocessing on the first processing result data to acquire second processing result data, and sending the second processing result data to the mobile terminal through the preset server. The method for establishing the connection with the mobile phone through the preset server enables the communication connection to be more stable and the data transmission to be more reliable.
Fig. 3 is a schematic flow chart of an implementation of a camera control method according to another embodiment of the present invention, as shown in the figure, the method may further include the following steps:
step S301, receiving request data sent by the mobile terminal through a preset server loaded by the camera.
The step is consistent with the content of step S101, and specific reference may be made to the related content of step S101.
Step S302, receiving the request data from the preset server through the sub-process of the camera, and determining whether the received request data is file management request data.
Step S303, if the received request data is file management request data, processing a file in the camera according to the request data by the file management subprocess, and generating second processing result data.
Illustratively, if the received request data is file management request data, the file management sub-process monitors a file management request connection, and then performs corresponding file processing tasks such as file list acquisition, file deletion, file information acquisition and the like on the SD card in the camera according to a command in the request connection.
Step S304, sending the second processing result data to the mobile terminal through the first server.
It should be noted that steps S303 to S304 are parallel to step S203 and step S204 of step S202 of the embodiment corresponding to fig. 2, which is "perform the first preprocessing on the received request data". Specifically, after receiving the request data from the preset server through the sub-process of the camera, determining whether the received request data is file management request data, and if the received request data is not file management request data, performing a first preprocessing on the received request data, and continuing to execute step S203 and step S204; if the received request data is file management request data, steps S303-S304 are performed.
The embodiment corresponding to fig. 2 differs from the embodiment corresponding to fig. 3 in that: fig. 2 corresponds to an embodiment of processing tasks performed by the main process, and fig. 3 corresponds to an embodiment of processing tasks performed by the file management sub-process.
Receiving the request data from the preset server through the sub-process of the camera, and judging whether the received request data is file management request data; when a file management request is received, the file management subprocess can directly execute the processing task without executing the processing task through the main process, so that multiple processes are respectively processed, and the processing efficiency is effectively improved; and when some process has a problem, other processes can still continue to work, and the reliability of the method is effectively improved.
Fig. 4 is a schematic flow chart of an implementation of a camera control method according to another embodiment of the present invention, as shown in the figure, the method may further include the following steps:
step S401, determining whether the request data is preset request data.
In practical applications, the preset request data may be control command request data, file thumbnail acquisition request data, long connection request data, and file management request data.
Step S402, if the request data is preset request data, receiving the request data sent by the mobile terminal through the first server.
Wherein the first server may be an HTTP server.
Step S403, establishing a connection with the first server through a management process of the sub-process, so that the sub-process receives the request data from the preset server through the management process.
After step S403, execution continues with steps S202-S204, or with steps S302-S304. For details, reference is made to the embodiments of fig. 2 and 3.
Step S404, if the request data is not the preset request data, receiving, by the second server, the request data sent by the mobile terminal.
Wherein the second server may be an RTSP server. Illustratively, if the request data is not preset request data, such as wifi preview request data, the request data sent by the mobile phone is received through the RTSP server.
The above steps S401 to S404 are specific implementation procedures of step S201.
Step S405, executing a processing task included in the request data by the host process, generating first processing result data, and sending the first processing result data to the mobile terminal through the second server.
Exemplarily, after receiving wifi preview request data sent by a mobile phone, the RTSP server sends the request data to a wifi communication application layer, and after receiving the request data, the wifi communication application layer starts a wifi preview function, and notifies a preview streaming data module (the preview streaming data module is a program for copying data to a shared memory when starting the wifi preview function), and sends the data to the shared memory of the RTSP server; the RTSP server continuously sends the data to the mobile phone through the shared memory of the RTSP server.
The embodiment of the invention judges whether the request data is preset request data; if the request data is preset request data, receiving the request data sent by the mobile terminal through a first server; if the request data are not preset request data, receiving the request data sent by the mobile terminal through a second server; and executing the processing task contained in the request data through the main process, generating first processing result data, and sending the first processing result data to the mobile terminal through the second server. The method utilizes different servers to receive different types of request data, so that the processing of the request data is more flexible; the RTSP streaming media server is adopted, so that the data transmission stability is greatly improved.
It should be understood that, the sequence numbers of the steps in the foregoing embodiments do not imply an execution sequence, and the execution sequence of each process should be determined by its function and inherent logic, and should not constitute any limitation to the implementation process of the embodiments of the present invention.
Fig. 5 is a schematic diagram of a control device of a camera according to an embodiment of the present invention, and for convenience of description, only a part related to the embodiment of the present invention is shown.
The control device 5 of the camera includes:
a receiving unit 51, configured to receive request data sent by the mobile terminal through a preset server loaded by the camera;
a first preprocessing unit 52, configured to receive the request data from the preset server through a sub-process of the camera, and perform first preprocessing on the received request data;
a first generating unit 53, configured to receive, by the main process of the camera, the first preprocessed request data from the sub-process, execute a processing task included in the request data, and generate first processing result data;
the second preprocessing unit 54 is configured to obtain the first processing result data from the main process through the sub-process, perform second preprocessing on the first processing result data to obtain second processing result data, and send the second processing result data to the mobile terminal through the preset server.
Optionally, the receiving unit 51 includes:
the first determining module 511 is configured to determine whether the request data is preset request data.
The first receiving module 512 is configured to receive, by the first server, the request data sent by the mobile terminal if the request data is the preset request data.
A connection module 513, configured to establish a connection with the first server through a management process of the sub-process, so that the sub-process receives the request data from the preset server through the management process.
Wherein the sub-process comprises:
the control command analysis subprocess, the thumbnail acquisition subprocess, the long connection subprocess and the file management subprocess.
Optionally, the apparatus 5 further includes:
a judging unit 55, configured to judge whether the received request data is file management request data before performing first preprocessing on the received request data;
the first preprocessing unit 52 is further configured to perform first preprocessing on the received request data if the received request data is not the file management request data;
a second generating unit 56, configured to, if the received request data is file management request data, process a file in the camera according to the request data by the file management sub-process, and generate second processing result data;
a sending unit 57, configured to send the second processing result data to the mobile terminal through the first server.
Optionally, the first preprocessing unit 52 includes:
the analysis module is used for analyzing the received request data through a sub-process corresponding to the request data and packaging the analyzed request data into a communication message;
and the first conversion module is used for converting the communication message into a data structure format.
Optionally, the receiving unit 51 further includes:
a second receiving module 514, configured to receive, after the determining whether the request data is preset request data, the request data sent by the mobile terminal through a second server if the request data is not preset request data;
the processing module 515 is configured to execute the processing task included in the request data through the host process, generate first processing result data, and send the first processing result data to the mobile terminal through the second server.
Optionally, the second preprocessing unit 54 includes:
and the second conversion module is used for converting the first processing result data into a JSON format.
It will be apparent to those skilled in the art that, for convenience and brevity of description, only the above-mentioned division of the functional units and modules is illustrated, and in practical applications, the above-mentioned function distribution may be performed by different functional units and modules according to needs, that is, the internal structure of the apparatus is divided into different functional units or modules to perform all or part of the above-mentioned functions. Each functional unit and module in the embodiments may be integrated in one processing unit, or each unit may exist alone physically, or two or more units are integrated in one unit, and the integrated unit may be implemented in a form of hardware, or in a form of software functional unit. In addition, specific names of the functional units and modules are only for convenience of distinguishing from each other, and are not used for limiting the protection scope of the present application. The specific working processes of the units and modules in the system may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
Fig. 6 is a schematic diagram of a terminal device according to an embodiment of the present invention. As shown in fig. 6, the terminal device 6 of this embodiment includes: a processor 60, a memory 61 and a computer program 62 stored in said memory 61 and executable on said processor 60. The processor 60, when executing the computer program 62, implements the steps in the above-described respective camera control method embodiments, such as steps S101 to S104 shown in fig. 1. Alternatively, the processor 60, when executing the computer program 62, implements the functions of the modules/units in the above-mentioned device embodiments, such as the functions of the modules 51 to 57 shown in fig. 5.
Illustratively, the computer program 62 may be partitioned into one or more modules/units that are stored in the memory 61 and executed by the processor 60 to implement the present invention. The one or more modules/units may be a series of computer program instruction segments capable of performing specific functions, which are used to describe the execution of the computer program 62 in the terminal device 6. For example, the computer program 62 may be divided into a receiving unit, a first preprocessing unit, a first generating unit, and a second preprocessing unit, and each unit has the following specific functions:
the receiving unit is used for receiving request data sent by the mobile terminal through a preset server loaded by the camera;
the first preprocessing unit is used for receiving the request data from the preset server through the sub-process of the camera and performing first preprocessing on the received request data;
a first generation unit, configured to receive, by a main process of the camera, first preprocessed request data from the sub-process, execute a processing task included in the request data, and generate first processing result data;
and the second preprocessing unit is used for acquiring the first processing result data from the main process through the sub-process, performing second preprocessing on the first processing result data to acquire second processing result data, and sending the second processing result data to the mobile terminal through the preset server.
Optionally, the receiving unit includes:
and the first judgment module is used for judging whether the request data is preset request data.
And the first receiving module is used for receiving the request data sent by the mobile terminal through the first server if the request data is preset request data.
And the connection module is used for establishing connection with the first server through a management process of the subprocess so that the subprocess receives the request data from the preset server through the management process.
Wherein the sub-process comprises:
the control command analysis subprocess, the thumbnail acquisition subprocess, the long connection subprocess and the file management subprocess.
Optionally, the apparatus further comprises:
a judging unit, configured to judge whether or not received request data is file management request data before performing first preprocessing on the received request data;
the first preprocessing unit is further used for performing first preprocessing on the received request data if the received request data is not the file management request data;
a second generating unit, configured to, if the received request data is file management request data, process a file in the camera according to the request data by the file management subprocess, and generate second processing result data;
and the sending unit is used for sending the second processing result data to the mobile terminal through the first server.
Optionally, the first preprocessing unit includes:
the analysis module is used for analyzing the received request data through a sub-process corresponding to the request data and packaging the analyzed request data into a communication message;
and the first conversion module is used for converting the communication message into a data structure format.
Optionally, the receiving unit further includes:
a second receiving module, configured to receive, by a second server, request data sent by the mobile terminal after the determining whether the request data is preset request data or not, if the request data is not preset request data;
and the processing module is used for executing the processing task contained in the request data through the main process, generating first processing result data and sending the first processing result data to the mobile terminal through the second server.
Optionally, the second preprocessing unit includes:
and the second conversion module is used for converting the first processing result data into a JSON format.
The terminal device 6 may be a desktop computer, a notebook, a palm computer, a cloud server, or other computing devices. The terminal device may include, but is not limited to, a processor 60, a memory 61. Those skilled in the art will appreciate that fig. 6 is merely an example of a terminal device 6 and does not constitute a limitation of terminal device 6 and may include more or less components than those shown, or some components in combination, or different components, for example, the terminal device may also include input output devices, network access devices, buses, etc.
The Processor 60 may be a Central Processing Unit (CPU), other general purpose Processor, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), an off-the-shelf Programmable Gate Array (FPGA) or other Programmable logic device, discrete Gate or transistor logic, discrete hardware components, etc. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
The memory 61 may be an internal storage unit of the terminal device 6, such as a hard disk or a memory of the terminal device 6. The memory 61 may also be an external storage device of the terminal device 6, such as a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card), and the like, which are provided on the terminal device 6. Further, the memory 61 may also include both an internal storage unit and an external storage device of the terminal device 6. The memory 61 is used for storing the computer program and other programs and data required by the terminal device. The memory 61 may also be used to temporarily store data that has been output or is to be output.
In the above embodiments, the descriptions of the respective embodiments have respective emphasis, and reference may be made to the related descriptions of other embodiments for parts that are not described or illustrated in a certain embodiment.
Those of ordinary skill in the art will appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware or combinations of computer software and electronic hardware. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the implementation. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present invention.
In the embodiments provided in the present invention, it should be understood that the disclosed apparatus/terminal device and method may be implemented in other ways. For example, the above-described embodiments of the apparatus/terminal device are merely illustrative, and for example, the division of the modules or units is only one logical division, and there may be other divisions when actually implemented, for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may be in an electrical, mechanical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present invention may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
The integrated modules/units, if implemented in the form of software functional units and sold or used as separate products, may be stored in a computer readable storage medium. Based on such understanding, all or part of the flow of the method according to the embodiments of the present invention may also be implemented by a computer program, which may be stored in a computer-readable storage medium, and when the computer program is executed by a processor, the steps of the method embodiments may be implemented. Wherein the computer program comprises computer program code, which may be in the form of source code, object code, an executable file or some intermediate form, etc. The computer-readable medium may include: any entity or device capable of carrying the computer program code, recording medium, usb disk, removable hard disk, magnetic disk, optical disk, computer Memory, Read-Only Memory (ROM), Random Access Memory (RAM), electrical carrier wave signals, telecommunications signals, software distribution medium, and the like. It should be noted that the computer readable medium may contain other components which may be suitably increased or decreased as required by legislation and patent practice in jurisdictions, for example, in some jurisdictions, computer readable media which may not include electrical carrier signals and telecommunications signals in accordance with legislation and patent practice.
The above-mentioned embodiments are only used for illustrating the technical solutions of the present invention, and not for limiting the same; although the present invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; such modifications and substitutions do not substantially depart from the spirit and scope of the embodiments of the present invention, and are intended to be included within the scope of the present invention.

Claims (9)

1. A method of controlling a camera, comprising:
receiving request data sent by a mobile terminal through a preset server loaded by the camera;
receiving the request data from the preset server through the sub-process of the camera, and performing first preprocessing on the received request data;
receiving first preprocessed request data from the subprocess through a main process of the camera, executing a processing task contained in the request data, and generating first processing result data;
acquiring the first processing result data from the main process through the sub-process, performing second preprocessing on the first processing result data to acquire second processing result data, and sending the second processing result data to the mobile terminal through the preset server;
the receiving, by the preset server loaded by the camera, the request data sent by the mobile terminal includes:
judging whether the request data is preset request data or not;
if the request data is preset request data, receiving the request data sent by the mobile terminal through a first server;
and establishing connection with the first server through a management process of the sub-process, so that the sub-process receives the request data from the preset server through the management process.
2. The method of controlling a camera according to claim 1, wherein the sub-process includes:
the control command analysis subprocess, the thumbnail acquisition subprocess, the long connection subprocess and the file management subprocess.
3. The method of controlling a camera according to claim 2, prior to the first preprocessing of the received request data, comprising:
judging whether the received request data is file management request data;
if the received request data is not the file management request data, performing first preprocessing on the received request data;
if the received request data is file management request data, processing files in the camera through the file management subprocess according to the request data, and generating second processing result data;
and sending the second processing result data to the mobile terminal through the first server.
4. The method for controlling a camera according to claim 3, wherein the first preprocessing of the received request data includes:
analyzing the received request data through a sub-process corresponding to the request data, and packaging the analyzed request data into a communication message;
and converting the communication message into a data structure format.
5. The method for controlling a camera according to claim 1, further comprising, after said determining whether the request data is preset request data:
if the request data are not preset request data, receiving the request data sent by the mobile terminal through a second server;
and executing the processing task contained in the request data through the main process, generating first processing result data, and sending the first processing result data to the mobile terminal through the second server.
6. The method for controlling a camera according to any one of claims 1 to 4, wherein the second preprocessing the first processing result data to obtain second processing result data includes:
and converting the first processing result data into a JSON format.
7. A control apparatus of a camera, characterized by comprising:
the receiving unit is used for receiving request data sent by the mobile terminal through a preset server loaded by the camera;
the first preprocessing unit is used for receiving the request data from the preset server through the sub-process of the camera and performing first preprocessing on the received request data;
a first execution unit, configured to receive, by a main process of the camera, first preprocessed request data from the sub-process, execute a processing task included in the request data, and generate first processing result data;
the second preprocessing unit is used for acquiring the first processing result data from the main process through the sub-process, performing second preprocessing on the first processing result data to acquire second processing result data, and sending the second processing result data to the mobile terminal through the preset server;
the receiving unit includes:
the first judgment module is used for judging whether the request data is preset request data or not;
the first receiving module is used for receiving the request data sent by the mobile terminal through the first server if the request data is preset request data;
and the connection module is used for establishing connection with the first server through a management process of the subprocess so that the subprocess receives the request data from the preset server through the management process.
8. A terminal device comprising a memory, a processor and a computer program stored in the memory and executable on the processor, characterized in that the processor implements the steps of the method according to any of claims 1 to 6 when executing the computer program.
9. A computer-readable storage medium, in which a computer program is stored which, when being executed by a processor, carries out the steps of the method according to any one of claims 1 to 6.
CN201711317560.XA 2017-12-12 2017-12-12 Method and device for realizing camera control based on mobile phone and terminal equipment Active CN108289165B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201711317560.XA CN108289165B (en) 2017-12-12 2017-12-12 Method and device for realizing camera control based on mobile phone and terminal equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201711317560.XA CN108289165B (en) 2017-12-12 2017-12-12 Method and device for realizing camera control based on mobile phone and terminal equipment

Publications (2)

Publication Number Publication Date
CN108289165A CN108289165A (en) 2018-07-17
CN108289165B true CN108289165B (en) 2020-08-21

Family

ID=62831646

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201711317560.XA Active CN108289165B (en) 2017-12-12 2017-12-12 Method and device for realizing camera control based on mobile phone and terminal equipment

Country Status (1)

Country Link
CN (1) CN108289165B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110287043B (en) * 2019-07-01 2021-04-02 浪潮集团有限公司 AWG control method and AWG control system for arbitrary waveform generator
CN112988499B (en) 2019-12-16 2022-10-21 阿波罗智联(北京)科技有限公司 Data processing method and device, electronic equipment and storage medium

Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101437077A (en) * 2003-06-23 2009-05-20 佳能株式会社 Mobile phone, control method thereof and image distribution system
CN202602814U (en) * 2012-03-28 2012-12-12 哈尔滨工业大学深圳研究生院 A mobile remote monitoring system based on wireless video transmission
CN103678614A (en) * 2013-12-17 2014-03-26 北京航天金盾科技有限公司 Information processing method for unlocking industry security administration
CN104639905A (en) * 2015-02-03 2015-05-20 广西智询信息科技有限公司 Wireless video monitoring method suitable for live broadcast on mobile terminal of iOS system
CN105721517A (en) * 2014-12-02 2016-06-29 速位互动系统有限公司 Camera controlled by smart phone and control system thereof
CN106453834A (en) * 2016-09-07 2017-02-22 努比亚技术有限公司 Mobile terminal and camera shooting method
CN106713453A (en) * 2016-12-22 2017-05-24 腾讯科技(深圳)有限公司 Application information monitoring method and device
CN106796553A (en) * 2014-09-03 2017-05-31 佳能株式会社 Communication equipment, message processing device, method and computer-readable recording medium
CN107040650A (en) * 2015-12-14 2017-08-11 澧达科技股份有限公司 Operate method of the mobile terminal to control intelligent apparatus
CN107222677A (en) * 2017-05-27 2017-09-29 成都通甲优博科技有限责任公司 The method and device that multi-cam is opened simultaneously

Patent Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101437077A (en) * 2003-06-23 2009-05-20 佳能株式会社 Mobile phone, control method thereof and image distribution system
CN202602814U (en) * 2012-03-28 2012-12-12 哈尔滨工业大学深圳研究生院 A mobile remote monitoring system based on wireless video transmission
CN103678614A (en) * 2013-12-17 2014-03-26 北京航天金盾科技有限公司 Information processing method for unlocking industry security administration
CN106796553A (en) * 2014-09-03 2017-05-31 佳能株式会社 Communication equipment, message processing device, method and computer-readable recording medium
CN105721517A (en) * 2014-12-02 2016-06-29 速位互动系统有限公司 Camera controlled by smart phone and control system thereof
CN104639905A (en) * 2015-02-03 2015-05-20 广西智询信息科技有限公司 Wireless video monitoring method suitable for live broadcast on mobile terminal of iOS system
CN107040650A (en) * 2015-12-14 2017-08-11 澧达科技股份有限公司 Operate method of the mobile terminal to control intelligent apparatus
CN106453834A (en) * 2016-09-07 2017-02-22 努比亚技术有限公司 Mobile terminal and camera shooting method
CN106713453A (en) * 2016-12-22 2017-05-24 腾讯科技(深圳)有限公司 Application information monitoring method and device
CN107222677A (en) * 2017-05-27 2017-09-29 成都通甲优博科技有限责任公司 The method and device that multi-cam is opened simultaneously

Also Published As

Publication number Publication date
CN108289165A (en) 2018-07-17

Similar Documents

Publication Publication Date Title
CN102413150B (en) Server and virtual desktop control method and virtual desktop control system
CN112261094B (en) Message processing method and proxy server
CN106549989B (en) Data transmission method and system, user terminal and application server
CN112650456A (en) Printing method and device and electronic equipment
CN109756568A (en) Processing method, equipment and the computer readable storage medium of file
US11671678B2 (en) Method and device, equipment, and storage medium for data processing
CN108289165B (en) Method and device for realizing camera control based on mobile phone and terminal equipment
CN107493486B (en) Method, system and terminal equipment for video playing termination
CN109788251B (en) Video processing method, device and storage medium
CN110881224B (en) Network long connection method, device, equipment and storage medium
CN114201280A (en) Multimedia data processing method, device, equipment and storage medium
CN111200653B (en) Multi-platform communication method, multi-platform communication device and intermediate server
CN113507530B (en) Data forwarding method, related system and device and storage medium
CN113535020B (en) Method, apparatus, device, medium and product for generating application icons
CN112511636B (en) Data transmission system, method, device, computer equipment and storage medium
CN104391576A (en) Remote input method and device based on wireless Ethernet
CN114244758A (en) Network diagnosis method, storage medium, electronic device and system of android platform
CN111917835A (en) System, method and device for monitoring network data
CN108833568B (en) Message synchronization method, client, server and electronic equipment
CN108021459B (en) Method and device for sending dotting logs across processes
CN113760693A (en) Method and apparatus for local debugging of microservice systems
CN113079055A (en) Method and device for dynamically acquiring AGV (automatic guided vehicle) running data
US10148765B2 (en) Security information interaction system, device and method
CN111368512B (en) Service data conversion method, device, equipment and storage medium
CN114710477B (en) Method and device for executing command

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant