CN115543932A - File processing method and device and electronic equipment - Google Patents

File processing method and device and electronic equipment Download PDF

Info

Publication number
CN115543932A
CN115543932A CN202211183464.1A CN202211183464A CN115543932A CN 115543932 A CN115543932 A CN 115543932A CN 202211183464 A CN202211183464 A CN 202211183464A CN 115543932 A CN115543932 A CN 115543932A
Authority
CN
China
Prior art keywords
application program
target file
application
proxy
file
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.)
Pending
Application number
CN202211183464.1A
Other languages
Chinese (zh)
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.)
Hisense Visual Technology Co Ltd
Original Assignee
Hisense Visual Technology 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 Hisense Visual Technology Co Ltd filed Critical Hisense Visual Technology Co Ltd
Priority to CN202211183464.1A priority Critical patent/CN115543932A/en
Publication of CN115543932A publication Critical patent/CN115543932A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/16File or folder operations, e.g. details of user interfaces specifically adapted to file systems
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/17Details of further file system functions
    • G06F16/176Support for shared access to files; File sharing support
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/61Installation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/54Interprogram communication
    • G06F9/542Event management; Broadcasting; Multicasting; Notifications

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Software Systems (AREA)
  • Data Mining & Analysis (AREA)
  • Databases & Information Systems (AREA)
  • Multimedia (AREA)
  • Human Computer Interaction (AREA)
  • Stored Programmes (AREA)

Abstract

The disclosure relates to a file processing method, a file processing device and electronic equipment, which are applied to the technical field of computers, wherein the method comprises the following steps: under the condition that the system application program does not have the capacity of calling the three-party application program to process the target file, sending a broadcast message to the proxy application program through the system application program, wherein the broadcast message comprises a storage path of the target file, and the storage path is used for the proxy application program to acquire the target file from a storage area corresponding to the system application program; receiving a broadcast message by a proxy application; generating a Uniform Resource Identifier (URI) based on a storage path through a proxy application program, wherein the URI is used for the three-party application program to acquire a target file from a storage area; sending the URI to the three-party application program through the proxy application program; receiving the URI through the three-party application; and acquiring the target file from the storage area through the three-party application program based on the URI, and processing the target file. The problem that the third-party application program is limited to access the file shared by the system application program can be solved.

Description

File processing method and device and electronic equipment
Technical Field
The embodiment of the application relates to computer technology. And more particularly, to a file processing method, apparatus, and electronic device.
Background
File security settings are newly added in the android system of the high version, and the third-party application program is limited to access the files shared by the system application programs.
A common approach to solve this problem in the industry today is to modify the source code associated with the android framework, but different android versions need to be adapted by modifying the respective source code. Therefore, the process of solving the authority problem by modifying the source code is complex, the workload is large, universality is not achieved, the instability of a system is increased by modifying the source code, and the maintainability is poor.
Disclosure of Invention
In order to solve the technical problem or at least partially solve the technical problem, the application provides a file processing method, a file processing device and an electronic device, which can solve the problem that a third-party application is restricted from accessing files shared by a system application.
In a first aspect, an embodiment of the present application provides a file processing method, which is applied to a first electronic device installed with a system application program, a three-party application program, and a proxy application program, and includes: under the condition that the system application program does not have the capacity of calling the three-party application program to process the target file, sending a broadcast message to the proxy application program through the system application program, wherein the broadcast message comprises a storage path of the target file, and the storage path is used for the proxy application program to acquire the target file from a storage area corresponding to the system application program; receiving a broadcast message by a proxy application; generating a Uniform Resource Identifier (URI) based on a storage path through a proxy application program, wherein the URI is used for a three-party application program to acquire a target file from a storage area; sending the URI to the three-way application through the proxy application; receiving the URI through the three-party application; and acquiring the target file from the storage area through the three-party application program based on the URI, and processing the target file.
In some embodiments of the present application, sending a broadcast message to a proxy application via a system application includes: detecting whether a proxy application program is installed in first electronic equipment; under the condition that a proxy application program is installed in the first electronic equipment, sending a broadcast message to the proxy application program through a system application program; installing the agent application under the condition that the agent application is not installed on the first electronic equipment; after the agent application is installed, a broadcast message is sent to the agent application by the system application.
In some embodiments of the present application, before sending the URI to the three-party application by the proxy application, the method further comprises: determining the file type of the target file through the agent application program; and determining the application program corresponding to the file type as a three-party application program.
In some embodiments of the present application, processing a target document includes: opening the target file under the condition that the file type is a document type or a picture type; playing the target file under the condition that the file type is an audio type or a video type; and in the case that the file type is the installation package type, installing the target file.
In some embodiments of the present application, before sending the broadcast message to the agent application via the system application, the method further comprises: receiving a target file from a second electronic device through a system application; the target file is stored to the storage area by the system application.
In some embodiments of the present application, generating, by the proxy application, a uniform resource identifier URI based on the storage path includes: detecting, by the proxy application, whether the storage area includes the target file based on the storage path; generating, by the proxy application, a URI based on the storage path in a case where the storage area includes the target file; and under the condition that the storage area does not comprise the target file, acquiring the target file from the second electronic equipment through the system application program, storing the target file into the storage area through the system application program, and generating the URI based on the storage path through the proxy application program.
In some embodiments of the present application, sending a broadcast message to a proxy application via a system application includes: detecting whether the storage area comprises a target file or not through a system application program; transmitting a broadcast message to the agent application through the system application in a case where the storage area includes the target file; under the condition that the storage area does not comprise the target file, the target file is obtained from the second electronic equipment through the system application program, and the target file is stored in the storage area through the system application program; a broadcast message is sent to the agent application by the system application.
In a second aspect, the present application provides a document processing apparatus comprising: the device comprises a sending module, a receiving module, a generating module, an acquiring module and a processing module; the sending module is used for sending a broadcast message to the proxy application program through the system application program under the condition that the system application program does not have the capacity of calling the three-party application program to process the target file, wherein the broadcast message comprises a storage path of the target file, the storage path is used for the proxy application program to acquire the target file from a storage area corresponding to the system application program, and the system application program, the three-party application program and the proxy application program are application programs installed in the first electronic device; the receiving module is used for receiving the broadcast message through the agent application program; the generation module is used for generating a Uniform Resource Identifier (URI) based on a storage path through the proxy application program, and the URI is used for the three-party application program to acquire a target file from a storage area; the sending module is also used for sending the URI to the three-party application program through the proxy application program; the receiving module is also used for receiving the URI through the three-party application program; the acquisition module is used for acquiring a target file from a storage area through a three-party application program based on a URI; the processing module is used for processing the target file.
In some embodiments of the present application, the apparatus further comprises: a detection module, an installation module; the detection module is used for detecting whether the first electronic equipment is provided with the agent application program or not; the sending module is specifically used for sending a broadcast message to the agent application program through the system application program under the condition that the agent application program is installed in the first electronic equipment; the installation module is used for installing the agent application program under the condition that the agent application program is not installed in the first electronic equipment, and the sending module is specifically used for sending the broadcast message to the agent application program through the system application program after the agent application program is installed.
In some embodiments of the present application, the apparatus further comprises: a determination module; the determining module is used for determining the file type of the target file through the proxy application program before the URI is sent to the three-party application program through the proxy application program; and determining the application program corresponding to the file type as a three-party application program.
In some embodiments of the present application, the processing module is specifically configured to open a target file when a file type is a document type or a picture type; playing the target file under the condition that the file type is an audio type or a video type; and in the case that the file type is the installation package type, installing the target file.
In some embodiments of the present application, the apparatus further comprises: a storage module; the receiving module is further used for receiving the target file from the second electronic equipment through the system application program before the broadcast message is sent to the agent application program through the system application program; the storage module is used for storing the target file in the storage area through the system application program.
In some embodiments of the present application, the detection module is further configured to detect, by the proxy application program, whether the storage area includes the target file based on the storage path; the generation module is specifically used for generating a URI (Uniform resource identifier) based on the storage path through a proxy application program under the condition that the storage area comprises the target file; the acquisition module is further used for acquiring the target file from the second electronic equipment through the system application program under the condition that the storage area does not comprise the target file; the storage module is further used for storing the target file in the storage area through a system application program, and the generation module is used for generating the URI through the agent application program based on the storage path.
In some embodiments of the present application, the detection module is further configured to detect, by a system application program, whether the storage area includes a target file; the sending module is specifically used for sending a broadcast message to the agent application program through the system application program under the condition that the storage area comprises the target file; the acquisition module is further used for acquiring the target file from the second electronic equipment through the system application program under the condition that the storage area does not comprise the target file, and the storage module is further used for storing the target file into the storage area through the system application program; the sending module is used for sending the broadcast message to the agent application program through the system application program.
In a third aspect, an electronic device is provided, which comprises a processor, a memory and a computer program stored on the memory and operable on the processor, and which, when executed by the processor, implements the steps of the file processing method according to the first aspect.
In a fourth aspect, the present application provides a computer-readable storage medium comprising: the computer-readable storage medium stores thereon a computer program which, when executed by a processor, implements the file processing method as shown in the first aspect.
In a fifth aspect, the present application provides a computer program product comprising: when the computer program product is run on a computer, the computer is caused to implement the file processing method as shown in the first aspect.
Compared with the prior art, the technical scheme provided by the embodiment of the application has the following advantages: in the embodiment of the application, under the condition that the system application program does not have the capacity of calling the three-party application program to process the target file, a broadcast message is sent to the proxy application program through the system application program, the broadcast message comprises a storage path of the target file, and the storage path is used for the proxy application program to acquire the target file from a storage area corresponding to the system application program; receiving a broadcast message by a proxy application; generating a Uniform Resource Identifier (URI) based on a storage path through a proxy application program, wherein the URI is used for the three-party application program to acquire a target file from a storage area; sending the URI to the three-way application through the proxy application; and acquiring the target file from the storage area through the three-party application program based on the URI, and processing the target file. And through the proxy application program, the three-party application program has the authority of accessing the target file corresponding to the system application program. The scheme has strong universality, the system application program can share the file to any three-party application program, modification of the android system source code is not involved, the invasion of the original code is low, and the problems of system instability and poor maintainability caused by modification of the source code are solved.
Drawings
In order to more clearly illustrate the embodiments of the present application or the implementation manner in the related art, a brief description will be given below of the drawings required for the description of the embodiments or the related art, and it is obvious that the drawings in the following description are some embodiments of the present application, and other drawings can be obtained by those skilled in the art according to the drawings.
FIG. 1 illustrates a schematic diagram of an operational scenario between a display device and a control apparatus according to some embodiments;
fig. 2 illustrates a hardware configuration block diagram of the control apparatus 100 according to some embodiments;
fig. 3 illustrates a hardware configuration block diagram of the display apparatus 200 according to some embodiments;
FIG. 4 illustrates an interaction diagram between applications in accordance with some embodiments;
FIG. 5 illustrates an interaction diagram between a terminal device 300 and a display device 200 according to some embodiments;
FIG. 6 illustrates one of the flow diagrams of a file processing method according to some embodiments;
FIG. 7 illustrates a second flow diagram of a document processing method according to some embodiments;
FIG. 8 illustrates a third intent on a flow of a document processing method according to some embodiments;
FIG. 9 illustrates a fourth flowchart depiction of a document processing method according to some embodiments;
FIG. 10 illustrates a fifth flow diagram of a document processing method according to some embodiments;
FIG. 11 illustrates a sixth flow diagram of a document processing method according to some embodiments;
FIG. 12 shows a seventh schematic flow diagram of a document processing method according to some embodiments;
FIG. 13 illustrates a schematic diagram of a structure of a document processing apparatus according to some embodiments.
Detailed Description
To make the purpose and embodiments of the present application clearer, the following will clearly and completely describe the exemplary embodiments of the present application with reference to the attached drawings in the exemplary embodiments of the present application, and it is obvious that the described exemplary embodiments are only a part of the embodiments of the present application, and not all of the embodiments.
It should be noted that the brief descriptions of the terms in the present application are only for the convenience of understanding the embodiments described below, and are not intended to limit the embodiments of the present application. These terms should be understood in their ordinary and customary meaning unless otherwise indicated.
The terms "first," "second," "third," and the like in the description and claims of this application and in the above-described drawings are used for distinguishing between similar or analogous objects or entities and not necessarily for describing a particular sequential or chronological order, unless otherwise indicated. It is to be understood that the terms so used are interchangeable under appropriate circumstances.
The terms "comprises" and "comprising," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a product or apparatus that comprises a list of elements is not necessarily limited to all elements expressly listed, but may include other elements not expressly listed or inherent to such product or apparatus.
In order to facilitate understanding of the technical solutions and the technical effects thereof described in the embodiments of the present application, the embodiments of the present application explain related terms:
uniform Resource Identifier (URI) that identifies a string of internet Resource names that allows a user to interact with any Resource (including local and internet) via a particular protocol. Such as HTML documents, images, video clips, programs, etc., are identified by a URI.
The electronic device provided by the embodiment of the present application may have various implementation forms, for example, the electronic device may be a television, a smart television, a laser projection device, a display (monitor), an electronic whiteboard (electronic whiteboard), an electronic desktop (electronic table), a mobile phone, a tablet computer, a notebook computer, a palm computer, a first vehicle-mounted electronic device, and the like.
The first electronic device in the embodiment of the present application may be a display device, and the display device is exemplarily described below. Fig. 1 is a schematic diagram of an operation scenario between a display device and a control device according to an embodiment, where the control device includes a smart device or a control apparatus. As shown in fig. 1, a user may operate the display apparatus 200 through the smart device 300 or the control device 100.
In some embodiments, the control apparatus 100 may be a remote controller, and the communication between the remote controller and the display device includes an infrared protocol communication or a bluetooth protocol communication, and other short-distance communication methods, and controls the display device 200 in a wireless or wired manner. The user may input a user command through a key on a remote controller, a voice input, a control panel input, etc. to control the display apparatus 200.
In some embodiments, the smart device 300 (e.g., mobile terminal, tablet, computer, laptop, etc.) may also be used to control the display device 200. For example, the display device 200 is controlled using an application program running on the smart device.
In some embodiments, the display device may not receive instructions using the smart device or control device described above, but rather receive user control through touch or gestures, or the like.
In some embodiments, the display device 200 may also be controlled in a manner other than the control apparatus 100 and the smart device 300, for example, the voice command control of the user may be directly received through a module configured inside the display device 200 to obtain a voice command, or may be received through a voice control device provided outside the display device 200.
In some embodiments, the display device 200 is also in data communication with a server 400. The display device 200 may be allowed to be communicatively connected through a Local Area Network (LAN), a Wireless Local Area Network (WLAN), and other networks. The server 400 may provide various contents and interactions to the display apparatus 200. The server 400 may be a cluster or a plurality of clusters, and may include one or more types of servers.
Fig. 2 exemplarily shows a block diagram of a configuration of the control apparatus 100 according to an exemplary embodiment. As shown in fig. 2, the control device 100 includes a controller 110, a communication interface 130, a user input/output interface 140, an external memory, and a power supply. The control apparatus 100 may receive an input operation instruction from a user and convert the operation instruction into an instruction recognizable and responsive by the display device 200, serving as an interaction intermediary between the user and the display device 200.
As shown in fig. 3, the display apparatus 200 includes at least one of a tuner demodulator 210, a communicator 220, a detector 230, an external device interface 240, a controller 250, a display 260, an audio output interface 270, a user interface 280, an external memory, and a power supply.
In some embodiments the controller comprises a processor, a video processor, an audio processor, a graphics processor, a RAM, a ROM, a first interface to an nth interface for input/output.
The display 260 includes a display screen component for presenting a picture, and a driving component for driving image display, a component for receiving an image signal from the controller output, performing display of video content, image content, and a menu manipulation interface, and a user manipulation UI interface.
The display 260 may be a liquid crystal display, an OLED display, and a projection display, and may also be a projection device and a projection screen.
The communicator 220 is a component for communicating with an external device or a server according to various communication protocol types. For example: the communicator may include at least one of a Wifi module, a bluetooth module, a wired ethernet module, and other network communication protocol chips or near field communication protocol chips, and an infrared receiver. The display apparatus 200 may establish transmission and reception of control signals and data signals with the external control device 100 or the server 400 through the communicator 220.
The user interface 280 may be used to receive control signals for controlling the apparatus 100 (e.g., an infrared remote control, etc.). It may also be used to directly receive an input operation instruction from a user and convert the operation instruction into an instruction recognizable and responsive by the display apparatus 200, which may be referred to as a user input interface.
The detector 230 is used to collect signals of the external environment or interaction with the outside. For example, detector 230 includes a light receiver, a sensor for collecting the intensity of ambient light; alternatively, the detector 230 includes an image collector, such as a camera, which may be used to collect external environment scenes, attributes of the user, or user interaction gestures, or the detector 230 includes a sound collector, such as a microphone, which is used to receive external sounds.
The external device interface 240 may include, but is not limited to, the following: high Definition Multimedia Interface (HDMI), analog or data high definition component input interface (component), composite video input interface (CVBS), USB input interface (USB), RGB port, and the like. Or may be a composite input/output interface formed by the plurality of interfaces.
The tuner demodulator 210 receives a broadcast television signal through a wired or wireless reception manner, and demodulates an audio/video signal, such as an EPG data signal, from a plurality of wireless or wired broadcast television signals.
In some embodiments, the controller 250 and the modem 210 may be located in different separate devices, that is, the modem 210 may also be located in an external device of the main device where the controller 250 is located, such as an external set-top box.
The controller 250 controls the operation of the display device and responds to the operation of the user through various software control programs stored in a memory (an internal memory or an external memory). The controller 250 controls the overall operation of the display apparatus 200. For example: in response to receiving a user command for selecting a UI object to be displayed on the display 260, the controller 250 may perform an operation related to the object selected by the user command.
In some embodiments the controller comprises at least one of a Central Processing Unit (CPU), a video processor, an audio processor, a Graphics Processing Unit (GPU), and Random Access Memory (RAM), a Read-Only Memory (ROM), first to nth interfaces for input/output, a communication Bus (Bus), and the like.
The RAM is also called a main memory, and is an internal memory that directly exchanges data with the controller. It can be read and written at any time (except for refreshing), and has high speed, and is usually used as a temporary data storage medium of an operating system or other programs in operation. The biggest difference with the ROM is the volatility of data, i.e. the stored data will be lost as soon as power is turned off. RAM is used in computers and digital systems to temporarily store programs, data, and intermediate results. The ROM operates in a non-destructive read mode, only reading information that cannot be written. Information is fixed after being written once, and even if the power is turned off, the information is not lost, so that the information is also called a fixed memory.
A user may input a user command on a Graphical User Interface (GUI) displayed on the display 260, and the user input interface receives the user input command through the Graphical User Interface (GUI). Alternatively, the user may input the user command by inputting a specific sound or gesture, and the user input interface receives the user input command by recognizing the sound or gesture through the sensor.
A "user interface" is a media interface for interaction and information exchange between an application or operating system and a user that enables the conversion of the internal form of information to a form acceptable to the user. A commonly used presentation form of the User Interface is a Graphical User Interface (GUI), which refers to a User Interface related to computer operations and displayed in a graphical manner. It may be an interface element such as an icon, a window, a control, etc. displayed in a display screen of the display device, where the control may include a visual interface element such as an icon, a button, a menu, a tab, a text box, a dialog box, a status bar, a navigation bar, a Widget, etc.
In some embodiments of the present application, a first electronic device is taken as an example to be described as the display device 200, and fig. 4 is a schematic view of interaction between applications provided in the embodiments of the present application. Among them, the display device 200 has the system application 21, the agent application 22, and the third party application 23 installed therein. The system application 21 needs to call the three-party application 23 to process the target file, but the three-party application 23 does not have access to the target file 2111 stored in the storage area 211 of the system application 21, so the system application 21 sends a broadcast message to the proxy application 22, the broadcast message includes a storage path of the target file, after receiving the broadcast message sent by the system application 21, the proxy application 22 generates a corresponding URI based on the storage path in the broadcast message, the proxy application 22 sends the URI to the three-party application 23, and the three-party application 23 processes the target file based on the received URI.
In some embodiments of the present application, a first electronic device is taken as a display device 200, a second electronic device is taken as a terminal device 300 for example, and fig. 5 is an interaction schematic diagram between the terminal device 300 and the display device 200 provided in the embodiments of the present application. The terminal device 300 has the first application program 31 installed therein, and the first application program 31 may be any application program that can transmit a target file to the display device 200. The system application 21 in the display device 200 receives the target file sent by the first application 31 in the terminal device 300, the system application 21 stores the target application in the storage area corresponding to the system application 21, and a specific process after the target file is stored is completed may refer to the related description in fig. 4, which is not described herein again.
In the embodiment of the present application, a file processing method is provided, which is applied to a first electronic device installed with a system application program, a third-party application program, and a proxy application program, and the following describes, by referring to fig. 6, file processing provided in the embodiment of the present application by way of example. The method may include steps 601 through 607 described below.
601. A broadcast message is sent to the agent application by the system application.
It should be noted that, the above-mentioned system application program sends the broadcast message to the proxy application program when the system application program does not have the capability of calling the third-party application program to process the target file.
The broadcast message comprises a storage path of the target file, and the storage path is used for the proxy application program to acquire the target file from a storage area corresponding to the system application program.
It can be understood that the system application is some applications that are carried by the first electronic device when the first electronic device leaves the factory, and specifically, the system application is different according to different electronic devices. A three-party application refers to a software application that is developed by a third-party developer for a functional deficiency of a certain software or application, and related software developed by an organization or individual other than the software composer.
It can be understood that the system application program does not have the capability of calling the third-party application program to process the target file, which means that the system application program itself does not have the capability of opening the target file, installing the target file, or playing the target file, and the third-party application program needs to be called in the system application program to open, install, or play the target file. When the system application program calls the three-party application program to process the target file, the three-party application program needs to be notified in a URI manner (the three-party application program requires to use the notification manner), but the three-party application program cannot access the URI of the system application (the URI comprises an identifier for indicating the application program generating the URI), namely, the authority for accessing the target file in the storage area corresponding to the system application program is not available, so that the system application program does not have the capability of directly calling the three-party application program to process the target file.
It can be understood that the called three-party application program may be preset, or may be determined based on the target file, which is determined according to the actual situation, and the embodiment of the present application is not limited.
602. A broadcast message is received by the proxy application.
It can be understood that the agent application is an application developed in the present solution, and the broadcast message sent by the system application can be received without the system application notifying the agent application in a URI manner.
It can be understood that the broadcast message includes a storage path of the target file, and the target file can be obtained according to the storage path.
603. The URI is generated by the proxy application based on the storage path.
The URI is used for the three-party application program to acquire the target file from the storage area.
604. The URI is sent to the three-way application by the proxy application.
605. The URI is received by the three-party application.
606. And acquiring the target file from the storage area based on the URI through the three-party application program.
607. The three-party application processes the target file.
It can be understood that the proxy application is a non-system application, so that the proxy application can access the three-party application based on the URI generated by the storage path, and therefore the three-party application can acquire and process the target file based on the URI.
In the embodiment of the application, under the condition that the system application program does not have the capacity of calling the three-party application program to process the target file, a broadcast message is sent to the proxy application program through the system application program, the broadcast message comprises a storage path of the target file, and the storage path is used for the proxy application program to acquire the target file from a storage area corresponding to the system application program; receiving a broadcast message by a proxy application; generating a Uniform Resource Identifier (URI) based on a storage path through a proxy application program, wherein the URI is used for a three-party application program to acquire a target file from a storage area; sending the URI to the three-party application program through the proxy application program; and acquiring the target file from the storage area through the three-party application program based on the URI, and processing the target file. And through the proxy application program, the three-party application program has the authority of accessing the target file corresponding to the system application program. The scheme has strong universality, the system application program can share the file to any three-party application program, modification of the android system source code is not involved, the invasion of the original code is low, and the problems of system instability and poor maintainability caused by modification of the source code are solved.
In some embodiments of the present application, the step 601 may be specifically implemented by the following steps 601a to 601d.
601a, detecting whether the agent application program is installed in the first electronic equipment.
If yes, the following step 601b is performed, otherwise the following steps 601c and 601d are performed.
601b, sending a broadcast message to the agent application through the system application.
601c, installing the agent application.
601d, after the agent application is installed, the broadcast message is sent to the agent application through the system application.
It can be understood that the system application detects whether the agent application is installed in the first electronic device, and in the case that the agent application is not installed on the first electronic device, the agent application can be installed in a silent installation manner (installation is performed directly according to default settings without any user intervention), so that user imperceptibility in the intermediate installation process is achieved without user participation.
In the embodiment of the application, whether a proxy application program is installed in first electronic equipment is detected; transmitting a broadcast message to a proxy application through a system application in a case where the proxy application is installed in a first electronic device; installing the agent application under the condition that the agent application is not installed on the first electronic equipment; after the agent application is installed, a broadcast message is sent to the agent application by the system application. Before the system application program sends the broadcast message, the agent application program is ensured to be installed in the first electronic equipment, the problem that no response exists after the broadcast message is sent is avoided, and in addition, under the condition that the agent application program is not installed, the silent installation mode can be adopted for installation, so that a user cannot perceive.
In this embodiment of the present application, before the step 604, the file processing method provided in this embodiment of the present application further includes the following steps 608 and 609.
608. The file type of the target file is determined by the proxy application.
609. And determining the application program corresponding to the file type as a three-party application program.
It can be understood that the file types of the target files are different, and the three-party application programs for processing the target files are different, and the three-party application programs are application programs capable of processing the target files, such as: the target file is of a document type, the determined three-party application program is an application program capable of opening a document, the target file is of an audio type, the determined three-party application program is an application program capable of playing an audio file, the target file is of a video type, the determined three-party application program is an application program capable of playing a video file, the target file is of an installation package type, and the determined three-party application program is an application program capable of executing installation of the file.
In the embodiment of the application, the file type of the target file is determined through the proxy application program; and determining the application program corresponding to the file type as a three-party application program. The agent application program can flexibly select the three-party application program capable of opening the target file according to the type of the target file, the implementation process is more intelligent, and the user experience is better.
In some embodiments of the present application, the step 607 may be specifically implemented by the following steps 607a to 607 c.
607a, in the case that the file type is the document type or the picture type, the target file is opened.
607b, in case that the file type is an audio type or a video type, the target file is played.
607c, if the file type is the installation package type, the target file is installed.
It will be appreciated that the file type of the target file may be determined from the suffix of the target file, such as: suffixes for document types are txt, doc, ppt, etc., suffixes for picture types are BMP, JPG, JPEG, PNG, GIF, etc., suffixes for audio types are MP3, wma, rm, wav, etc., suffixes for video types are FLV, AVI, MOV, MP4, WMV, etc., suffixes for installation package types are apk, etc.
It can be understood that different file types and corresponding processing are different, and it should be noted that the file types provided in the embodiments of the present application are not limited to the embodiments of the present application, and other file types may also be included in practical applications.
In the embodiment of the application, the target file is opened under the condition that the file type is a document type or a picture type; playing the target file under the condition that the file type is an audio type or a video type; and in the case that the file type is the installation package type, installing the target file. The processing corresponding to the files of different file types is different, and the three-party application program can flexibly select the operation corresponding to the processing target file according to the file types.
In some embodiments of the present application, before the step 601, the file processing method provided in the embodiments of the present application further includes the following steps 610 and 611.
610. A target file is received from the second electronic device through the system application.
611. The target file is stored to the storage area by the system application.
It is understood that the application program of the second electronic device shares the target file with the application program of the first electronic device, such as: and the file transmission application of the second electronic equipment sends the target file to the screen projection application of the first electronic equipment.
It is understood that, in the first electronic device, the system application for receiving the target file is generally an application for file transfer, and does not have the capability of opening, playing or installing the target file, so that the three-party application is invoked to open, play or install the target file.
In the embodiment of the application, the target file is received from the second electronic equipment through the system application program; the target file is stored to the storage area by the system application. Therefore, the target file of the system application program sent to the first electronic device by the second electronic device is realized, and the third-party application program is called to process the target file through the proxy application program under the condition that the target file cannot be processed by the system application program.
In some embodiments of the present application, the step 603 may be specifically implemented by the following steps 603a to 603 d.
603a, detecting whether the storage area comprises the target file or not through the proxy application program based on the storage path.
If yes, the following step 603b is performed, otherwise, the following steps 603c, 603d and 603b are performed sequentially.
603b generating the URI based on the storage path by the proxy application.
603c, obtaining the target file from the second electronic equipment through the system application program.
603d, storing the object file in the storage area through the system application program.
It can be understood that the system application stores the target file in the storage area, but there may be a problem of storage failure or file loss, and when the proxy application cannot obtain the target file in the storage area based on the URI, an error may be caused in the execution process. To avoid this, the proxy application detects whether the target file exists in the storage area before generating the URI based on the storage path, so as to ensure that the target file exists in the storage area.
Specifically, when the target file does not exist in the storage area, the system application sends a request message to the second electronic device to request the second electronic device to send the target file again, the second electronic device sends the target file to the system application after receiving the request message of the system application, and the system application receives the target file and stores the target file in the storage area.
In the embodiment of the application, whether a storage area comprises a target file is detected through a proxy application program based on a storage path; generating, by the proxy application, a URI based on the storage path in a case where the storage area includes the target file; and under the condition that the storage area does not comprise the target file, acquiring the target file from the second electronic equipment through the system application program, storing the target file into the storage area through the system application program, and generating the URI based on the storage path through the proxy application program. Before the agent application program generates the URI based on the storage path, the target file in the storage area is ensured to exist, and the problem of execution errors caused by the fact that the target file cannot be obtained by the three-party application program in the subsequent execution process is solved.
In some embodiments of the present application, the step 601 may be specifically implemented by the following steps 601e to 603 d.
601e, detecting whether the storage area comprises the target file or not through the system application program.
If so, the following step 601f is performed, otherwise, the following step 601g, step 601h and step 601f are sequentially performed.
601f, sending the broadcast message to the agent application through the system application.
601g, obtaining the target file from the second electronic equipment through the system application program.
601h, storing the target file in a storage area through a system application program.
It can be understood that before the system application program sends the broadcast message to the agent application program, the system application program detects whether the target file exists in the storage area, so that the three-party application program can acquire and process the target file in the subsequent execution process, and various problems caused by the fact that the three-party application program cannot acquire the target file are avoided. Moreover, the system application program detects whether the target file exists in the storage area, and the subsequent steps are not executed, so that the efficiency of the whole processing flow is higher.
In the embodiment of the application, whether a storage area comprises a target file is detected through a system application program; transmitting a broadcast message to the agent application through the system application in a case where the storage area includes the target file; under the condition that the storage area does not comprise the target file, the target file is obtained from the second electronic equipment through the system application program, and the target file is stored in the storage area through the system application program; a broadcast message is sent to the agent application by the system application. The system application program detects whether the target file exists in the storage area, various problems caused by the fact that the target file cannot be obtained by the three-party application program are avoided, the target file is stored, namely the target file is detected, and subsequent steps are not executed.
In an embodiment of the present application, as shown in fig. 13, there is provided a document processing apparatus including: a sending module 1301, a receiving module 1302, a generating module 1303, an obtaining module 1304 and a processing module 1305; the sending module 1301 is configured to send a broadcast message to the proxy application program through the system application program under the condition that the system application program does not have a capability of calling a third-party application program to process the target file, where the broadcast message includes a storage path of the target file, the storage path is used for the proxy application program to obtain the target file from a storage area corresponding to the system application program, and the system application program, the third-party application program, and the proxy application program are application programs installed in the first electronic device; the receiving module 1302, configured to receive a broadcast message through a proxy application; the generating module 1303 is configured to generate a uniform resource identifier URI based on the storage path through the proxy application, where the URI is used by the third-party application to obtain the target file from the storage area; the sending module 1301 is further configured to send the URI to the third party application through the proxy application; the receiving module 1302 is further configured to receive the URI through the three-party application; the obtaining module 1304 is configured to obtain, by the three-party application, the target file from the storage area based on the URI; the processing module 1305 is configured to process the target file.
In some embodiments of the present application, the apparatus further comprises: a detection module, an installation module; the detection module is used for detecting whether the first electronic equipment is provided with the agent application program or not; the sending module 1301 is specifically configured to send a broadcast message to a proxy application program through a system application program when the proxy application program is installed in the first electronic device; the installing module is configured to install the proxy application program when the first electronic device does not have the proxy application program installed, and the sending module 1301 is specifically configured to send a broadcast message to the proxy application program through the system application program after the proxy application program is installed.
In some embodiments of the present application, the apparatus further comprises: a determination module; the determining module is used for determining the file type of the target file through the proxy application program before the URI is sent to the three-party application program through the proxy application program; and determining the application program corresponding to the file type as a three-party application program.
In some embodiments of the present application, the processing module 1305 is specifically configured to open the target file when the file type is a document type or a picture type; playing the target file under the condition that the file type is an audio type or a video type; and in the case that the file type is the installation package type, installing the target file.
In some embodiments of the present application, the apparatus further comprises: a storage module; the receiving module 1302, further configured to receive a target file from the second electronic device through the system application before sending the broadcast message to the agent application through the system application; the storage module is used for storing the target file in the storage area through the system application program.
In some embodiments of the present application, the detection module is further configured to detect, by the proxy application program, whether the storage area includes the target file based on the storage path; the generating module 1303 is specifically configured to generate, by the proxy application program, a URI based on the storage path if the storage area includes the target file; the obtaining module 1304 is further configured to obtain, by the system application, the target file from the second electronic device if the storage area does not include the target file; the storage module is further configured to store the target file in the storage area through the system application, and the generating module 1303 is configured to generate the URI based on the storage path through the proxy application.
In some embodiments of the present application, the detection module is further configured to detect, by a system application program, whether the storage area includes a target file; the sending module 1301 is specifically configured to send a broadcast message to the agent application program through the system application program when the storage area includes the target file; the obtaining module 1304 is further configured to obtain, by the system application program, the target file from the second electronic device if the storage area does not include the target file, and the storage module is further configured to store the target file in the storage area by the system application program; the sending module 1301 is configured to send a broadcast message to the agent application through the system application.
The file processing apparatus provided in the embodiment of the present application can achieve the same technical effects as those of the method embodiments described above, and is not described here again to avoid repetition.
The embodiment of the present invention further provides a computer-readable storage medium, where a computer program is stored on the computer-readable storage medium, and when the computer program is executed by a processor, the computer program implements each process executed by the file processing method, and can achieve the same technical effect, and in order to avoid repetition, details are not repeated here.
The computer-readable storage medium may be a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk.
The present invention provides a computer program product comprising: when the computer program product runs on a computer, the computer is caused to implement the file processing method described above.
Finally, it should be noted that: the above embodiments are only used to illustrate the technical solutions of the present application, and not to limit the same; although the present application has been described in detail with reference to the foregoing embodiments, it should 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 or all of the technical features may be equivalently replaced; and the modifications or the substitutions do not make the essence of the corresponding technical solutions depart from the scope of the technical solutions of the embodiments of the present application.
The foregoing description, for purposes of explanation, has been presented in conjunction with specific embodiments. However, the illustrative discussions above are not intended to be exhaustive or to limit the embodiments to the precise forms disclosed above. Many modifications and variations are possible in light of the above teaching. The embodiments were chosen and described in order to best explain the principles and the practical application, to thereby enable others skilled in the art to best utilize the embodiments and various embodiments with various modifications as are suited to the particular use contemplated.

Claims (10)

1. A file processing method applied to a first electronic device in which a system application, a three-party application, and a proxy application are installed, the method comprising:
under the condition that the system application program does not have the capacity of calling the three-party application program to process the target file, sending a broadcast message to the proxy application program through the system application program, wherein the broadcast message comprises a storage path of the target file, and the storage path is used for the proxy application program to acquire the target file from a storage area corresponding to the system application program;
receiving the broadcast message by the agent application;
generating a Uniform Resource Identifier (URI) based on the storage path through the proxy application program, wherein the URI is used for the three-party application program to acquire the target file from the storage area;
sending the URI to the three-party application through the proxy application;
receiving, by the three-party application, the URI;
and acquiring the target file from the storage area through the three-party application program based on the URI, and processing the target file.
2. The method of claim 1, wherein sending a broadcast message to a proxy application by the system application comprises:
detecting whether the agent application is installed in the first electronic equipment;
transmitting the broadcast message to the agent application through the system application in a case where the agent application is installed in the first electronic device;
installing the agent application in the case that the agent application is not installed in the first electronic device; and after the agent application program is installed, sending the broadcast message to the agent application program through the system application program.
3. The method of claim 1, wherein prior to sending the URI to the three-party application by the proxy application, the method further comprises:
determining, by the agent application, a file type of the target file;
and determining the application program corresponding to the file type as the three-party application program.
4. The method of claim 3, wherein the processing the object file comprises:
opening the target file under the condition that the file type is a document type or a picture type;
under the condition that the file type is an audio type or a video type, playing the target file;
and installing the target file under the condition that the file type is an installation package type.
5. The method of claim 1, wherein prior to sending the broadcast message to the broker application by the system application, the method further comprises:
receiving, by the system application, the target file from a second electronic device;
and storing the target file to the storage area through the system application program.
6. The method of claim 5, wherein generating, by the proxy application, a Uniform Resource Identifier (URI) based on the storage path comprises:
detecting, by the proxy application, whether the storage area includes the target file based on the storage path;
generating, by the proxy application, the URI based on the storage path in a case where the storage area includes the target file;
and under the condition that the storage area does not comprise the target file, acquiring the target file from the second electronic equipment through the system application program, storing the target file into the storage area through the system application program, and generating the URI based on the storage path through the proxy application program.
7. The method of claim 5, wherein sending a broadcast message to a proxy application by the system application comprises:
detecting, by the system application, whether the storage area includes the target file;
sending, by the system application, the broadcast message to the agent application if the storage area includes the target file;
under the condition that the storage area does not comprise the target file, acquiring the target file from the second electronic equipment through the system application program, and storing the target file into the storage area through the system application program; sending, by the system application, the broadcast message to the broker application.
8. A document processing apparatus, characterized in that the apparatus comprises: the device comprises a sending module, a receiving module, a generating module, an acquiring module and a processing module;
the sending module is configured to send a broadcast message to a proxy application program through a system application program under the condition that the system application program does not have a capability of calling a third-party application program to process a target file, where the broadcast message includes a storage path of the target file, the storage path is used for the proxy application program to obtain the target file from a storage area corresponding to the system application program, and the system application program, the third-party application program, and the proxy application program are application programs installed in a first electronic device;
the receiving module is used for receiving the broadcast message through the agent application program;
the generation module is used for generating a Uniform Resource Identifier (URI) based on the storage path through the proxy application program, wherein the URI is used for the three-party application program to acquire the target file from the storage area;
the sending module is further used for sending the URI to the three-party application program through the agent application program;
the receiving module is further used for receiving the URI through the three-party application program;
the acquisition module is used for acquiring the target file from the storage area through the three-party application program based on the URI;
and the processing module is used for processing the target file.
9. The apparatus of claim 8, further comprising: a detection module, an installation module;
the detection module is used for detecting whether the agent application program is installed in the first electronic equipment;
the sending module is specifically configured to send the broadcast message to the agent application program through the system application program when the agent application program is installed in the first electronic device;
the installing module is configured to install the proxy application program when the proxy application program is not installed in the first electronic device, and the sending module is specifically configured to send the broadcast message to the proxy application program through the system application program after the proxy application program is installed.
10. An electronic device comprising a processor, a memory and a program or instructions stored on the memory and executable on the processor, the program or instructions, when executed by the processor, implementing the steps of the file processing method according to any one of claims 1 to 7.
CN202211183464.1A 2022-09-27 2022-09-27 File processing method and device and electronic equipment Pending CN115543932A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211183464.1A CN115543932A (en) 2022-09-27 2022-09-27 File processing method and device and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211183464.1A CN115543932A (en) 2022-09-27 2022-09-27 File processing method and device and electronic equipment

Publications (1)

Publication Number Publication Date
CN115543932A true CN115543932A (en) 2022-12-30

Family

ID=84729985

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211183464.1A Pending CN115543932A (en) 2022-09-27 2022-09-27 File processing method and device and electronic equipment

Country Status (1)

Country Link
CN (1) CN115543932A (en)

Similar Documents

Publication Publication Date Title
US20230403425A1 (en) Systems, methods, and media for presenting media content
US9451319B2 (en) Streaming digital content with flexible remote playback
TWI483120B (en) Metadata driven collaboration between applications and web services
WO2020233142A1 (en) Multimedia file playback method and apparatus, electronic device, and storage medium
CN114286165B (en) Display equipment, mobile terminal, and screen-throwing data transmission method and system
US9865228B2 (en) Computer program product, information processing method, and information processing apparatus
CN112612443B (en) Audio playing method, display device and server
CN113556588B (en) Reverse control method, device, computer equipment and storage medium
CN113064645B (en) Startup interface control method and display device
CN113766305A (en) Display device and mirror image screen projection audio output control method
WO2017181966A1 (en) Method and device for accessing interactive internet protocol television service, and storage medium
CN112486921B (en) File synchronization method, display device and mobile terminal
CN114286137A (en) Mirror image screen projection method, display device and terminal
CN115543932A (en) File processing method and device and electronic equipment
US20150215575A1 (en) Relay apparatus
CN113590063A (en) Method for controlling multimedia presentation by third party
CN113613047A (en) Media file playing control method and display device
CN105224673B (en) Media file transmission method and device
CN115190342B (en) Display device control method and device, electronic device and readable storage medium
US20230306831A1 (en) Remote camera system gateway
WO2022033153A1 (en) Display method and display device
US11604874B1 (en) Providing audio visual privacy controls
CN113992963A (en) Display device and screen projection method
US20240119816A1 (en) Connection management in a premises management system
WO2023144841A1 (en) Method & system for offline casting

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