CN115794634B - Communication method and device of application program, electronic equipment and storage medium - Google Patents

Communication method and device of application program, electronic equipment and storage medium Download PDF

Info

Publication number
CN115794634B
CN115794634B CN202211516413.6A CN202211516413A CN115794634B CN 115794634 B CN115794634 B CN 115794634B CN 202211516413 A CN202211516413 A CN 202211516413A CN 115794634 B CN115794634 B CN 115794634B
Authority
CN
China
Prior art keywords
page
application program
target
target application
controlling
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
CN202211516413.6A
Other languages
Chinese (zh)
Other versions
CN115794634A (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.)
Beijing 58 Information Technology Co Ltd
Original Assignee
Beijing 58 Information 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 Beijing 58 Information Technology Co Ltd filed Critical Beijing 58 Information Technology Co Ltd
Priority to CN202211516413.6A priority Critical patent/CN115794634B/en
Publication of CN115794634A publication Critical patent/CN115794634A/en
Application granted granted Critical
Publication of CN115794634B publication Critical patent/CN115794634B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Abstract

The embodiment of the application provides a communication method and device of an application program, electronic equipment and a storage medium, and relates to the technical field of communication. The front end is provided with a main page, a first page and a second page, wherein the main page is used for simulating the communication service of a target application program, and the method comprises the following steps: the control main page obtains an operation request sent by the first page based on the communication service of the target application program, wherein the operation request comprises operation data for simulating the execution of the source terminal on target content locally displayed by the source terminal; and the control main page sends an operation request to the second page based on the communication service of the target application program, so that the second page responds to the operation request, and the simulation destination terminal executes operation data aiming at the target content locally displayed by the destination terminal. When the application is used for debugging the application program, two terminal devices and servers are not needed, the debugging efficiency is higher, and the cost is lower.

Description

Communication method and device of application program, electronic equipment and storage medium
Technical Field
The present application relates to the field of communications technologies, and in particular, to a method and apparatus for communicating an application program, an electronic device, and a storage medium.
Background
Currently, when debugging an APP (such as native) running based on a terminal local operating system, for debugging corresponding versions (such as a merchant end and a client end) related to the same APP, two corresponding versions of the APP generally need to be installed on two different terminal devices respectively. In the related technology, one of the terminal devices triggers the APP, a certain operation request is sent to the server, and the server sends an operation instruction to the APP of the other terminal device after receiving the operation request, so that the communication between the two devices is realized, and the debugging work is completed. However, the communication mode not only needs to use two terminal devices, but also needs to participate in a server, so that the cost is high and the debugging efficiency is low.
Disclosure of Invention
Aspects of the present application provide a communication method, apparatus, electronic device, and storage medium for an application program, so as to improve debugging efficiency of the application program and reduce cost.
The embodiment of the application provides a communication method of an application program, wherein a main page, a first page and a second page are arranged at the front end, the main page is used for simulating communication service of a target application program, the first page is used for simulating and displaying a source page in the target application program of a source terminal, the second page is used for simulating and displaying a destination page in the target application program of a destination terminal, and at least partial same target contents of the source page and the destination page exist in the first page and the second page, and the method comprises the following steps: controlling the main page to acquire an operation request sent by the first page based on a communication service of the target application program, wherein the operation request comprises operation data for simulating the execution of the source terminal for the target content locally displayed by the source terminal; and controlling the main page to send the operation request to the second page based on the communication service of the target application program, so that the second page responds to the operation request and simulates the target terminal to execute the operation data aiming at the target content locally displayed by the target terminal.
In an optional embodiment, after the main page sends the operation request to the second page, controlling the main page to acquire a second response result from the second page based on the communication service of the target application program; and judging whether the response of the second page to the operation request is successful or not according to the second response result.
In an alternative embodiment, after the main page acquires the operation request sent by the first page, the main page is controlled to return a first response result to the first page based on the communication service of the target application program; judging whether the main page successfully acquires the operation request sent by the first page or not according to the first response result.
In an alternative embodiment, the main page is provided with a set application programming interface, and the application programming interface is used for simulating the communication service of the target application program by packaging the communication mode of the target application program; the operation request sent by the first page is sent by the first page calling the application programming interface.
In an optional embodiment, the main page is provided with a first iframe tag and a second iframe tag which are preconfigured and respectively correspond to the first page and the second page, and URL addresses of target servers corresponding to the target application programs are arranged in the first iframe tag and the second iframe tag; before the controlling the main page to acquire the operation request transmitted by the first page based on the communication service of the target application, the method further includes: controlling the main page to acquire a first page loading request sent by the first page based on the communication service of the target application program, wherein the first page loading request comprises a first request identification matched with the first iframe tag; controlling the main page to acquire the first iframe tag according to the first request identifier, and acquiring a URL address corresponding to the target application program according to the first iframe tag; controlling the main page to load the URL address; and controlling the main page to send the target content loaded by the URL to the first page so as to enable the first page to display the target content.
In an alternative embodiment, before the controlling the main page to send the operation request to the second page based on the communication service of the target application, the method further includes: controlling the main page to acquire a second page loading request sent by the second page based on the communication service of the target application program, wherein the second page loading request comprises a second request identification matched with the second iframe tag; controlling the main page to acquire the second iframe tag according to the second request identifier, and acquiring the URL address corresponding to the target application program according to the second iframe tag; controlling the main page to load the URL address; and controlling the main page to send the target content loaded by the URL to the second page so as to enable the second page to display the target content.
The embodiment of the application also provides a communication device of an application program, wherein a main page, a first page and a second page are arranged at the front end, the main page is used for simulating communication service of a target application program, the first page is used for simulating and displaying a source page in the target application program of a source terminal, the second page is used for simulating and displaying a target page in the target application program of a target terminal, and at least partial same target contents of the source page and the target page exist in the first page and the second page, and the device comprises: a first communication module for controlling the main page to acquire an operation request sent by the first page based on a communication service of the target application, the operation request including operation data for simulating the execution of the source terminal for the target content locally displayed by the source terminal; and the second communication module is used for controlling the main page to send the operation request to the second page based on the communication service of the target application program, so that the second page responds to the operation request and simulates the target content locally displayed by the target terminal to execute the operation data.
In an alternative embodiment, the apparatus further comprises: the first judging module is used for controlling the main page to acquire a second response result from the second page based on the communication service of the target application program after the main page sends the operation request to the second page; and judging whether the response of the second page to the operation request is successful or not according to the second response result.
In an alternative embodiment, the apparatus further comprises: a second judging module, configured to control, after the main page acquires an operation request sent by the first page, the main page to return a first response result to the first page based on a communication service of the target application; judging whether the main page successfully acquires the operation request sent by the first page or not according to the first response result.
In an alternative embodiment, the main page is provided with a set application programming interface, and the application programming interface is used for simulating the communication service of the target application program by packaging the communication mode of the target application program; the operation request sent by the first page is sent by the first page calling the application programming interface.
In an optional embodiment, the main page has a first iframe tag and a second iframe tag that are configured in advance and respectively correspond to the first page and the second page, and the first iframe tag and the second iframe tag have URL addresses of target servers corresponding to the target application program in the URL addresses, and the apparatus further includes: the first control module is used for controlling the main page to acquire a first page loading request sent by the first page based on the communication service of the target application program, wherein the first page loading request comprises a first request identifier matched with the first iframe tag; controlling the main page to acquire the first iframe tag according to the first request identifier, and acquiring a URL address corresponding to the target application program according to the first iframe tag; controlling the main page to load the URL address; and controlling the main page to send the target content loaded by the URL address to the first page so as to enable the first page to display the target content.
In an alternative embodiment, the apparatus further comprises: the second control module is used for controlling the main page to acquire a second page loading request sent by the second page based on the communication service of the target application program, wherein the second page loading request comprises a second request identifier matched with the second iframe tag; controlling the main page to acquire the second iframe tag according to the second request identifier, and acquiring the URL address corresponding to the target application program according to the second iframe tag; controlling the main page to load the URL address; and controlling the main page to send the target content loaded by the URL address to the second page so as to enable the second page to display the target content.
The embodiment of the application also provides electronic equipment, which comprises: a processor; a memory for storing the processor-executable instructions; wherein the processor is configured to execute the instructions to implement the communication method of the application program described above.
Embodiments of the present application also provide a computer-readable storage medium, which when executed by a processor of an electronic device, enables the electronic device to perform the above-described communication method of an application program.
The embodiment of the application also provides a computer program product, which comprises a computer program, wherein the computer program is executed by a processor to realize the communication method of the application program.
In the embodiment of the application, the operation data executed by the source terminal for the target content locally displayed by the source terminal can be simulated by controlling the main page to acquire the operation request sent by the first page based on the communication service of the target application program. And the second page can respond to the operation request by controlling the main page to send the operation request to the second page based on the communication service of the target application program, simulate the target content locally displayed by the target terminal to execute the operation data, and judge whether the debugging of the target application program is successful or not by judging whether the second page can successfully execute the operation content. The application simulates the communication service of the target application program through the main page, simulates the source terminal and the second terminal through the first page and the second page respectively, and communicates based on the communication service, thus the debugging of the target application program can be completed, the whole process can complete the debugging work of the target application program at the front end without using two terminal devices and servers, the cost is lower, and the debugging efficiency is higher.
Drawings
The accompanying drawings, which are included to provide a further understanding of the application and are incorporated in and constitute a part of this specification, illustrate embodiments of the application and together with the description serve to explain the application and do not constitute a limitation on the application. In the drawings:
FIG. 1 is a flowchart of a communication method of an application program according to an embodiment of the present application;
FIG. 2 is a flowchart of a method for displaying a first page according to an embodiment of the present application;
FIG. 3 is a flowchart of a method for displaying a second page according to an embodiment of the present application;
fig. 4 is a schematic structural diagram of a communication device of an application program according to an embodiment of the present application;
fig. 5 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more apparent, the technical solutions of the present application will be clearly and completely described below with reference to specific embodiments of the present application and corresponding drawings. It will be apparent that the described embodiments are only some, but not all, embodiments of the application. All other embodiments, which can be made by those skilled in the art based on the embodiments of the application without making any inventive effort, are intended to be within the scope of the application.
Aiming at the technical problems of higher cost and lower efficiency of debugging application programs by adopting two terminal devices and servers corresponding to the two terminal devices in the prior art, the embodiment of the application provides a communication method of the application programs, an execution main body is a central processing unit (Central Processing Unit, CPU for short) in a computer system, a main page, a first page and a second page are arranged at the front end of the communication method, wherein the main page is used for simulating communication services of a target application program, the first page is used for simulating and displaying a source page in the target application program of a source terminal, the second page is used for simulating and displaying a target page in the target application program of a target terminal, at least part of the same target content of the source page and the destination page exists in the first page and the second page, for example, assuming that the target application program is a real estate transaction type application program, at this time, the first page may be used to simulate a terminal application program page of a merchant, the second page may be used to simulate a terminal application program page of a customer, and part of the same target content existing in the first page and the second page may be the same real estate Virtual Reality (VR) content, where the source terminal and the destination terminal may include mobile terminal devices such as a smart phone, a tablet computer, an electronic book reader, a laptop, a vehicle-mounted computer, and the like. Furthermore, it should be understood that in the computer field, there are generally front-end and back-end, the front-end mainly performing display work and interacting with users, such as web page ends; and the front end is mainly aimed at actual logic processing, such as a server end, and the front end and the back end are in cooperation and co-operation.
Fig. 1 is a flowchart of a communication method of an application program according to an embodiment of the present application, as shown in fig. 1, where the method includes:
step 101, the control main page obtains an operation request sent by the first page based on the communication service of the target application program, wherein the operation request comprises operation data for simulating the execution of the source terminal on the target content locally displayed by the source terminal.
And 102, controlling the main page to send an operation request to the second page based on the communication service of the target application program, so that the second page responds to the operation request, and simulating the target terminal to execute operation data aiming at target content locally displayed by the target terminal.
In practical application, a main page for simulating the communication service of the target application program is created in advance at the front end, and a first page for simulating the source page in the target application program of the display source terminal and a second page for simulating the destination page in the target application program of the display destination terminal are created (namely, a communication module capable of simulating the communication service of the target application program is created, so that the first page and the second page can communicate based on the communication module, and further debugging of the target application program is completed).
In the implementation, the first page is controlled to send the operation request to the main page in response to the operation request triggered by the user on the first page. After the main page obtains the operation request sent by the first page based on the communication service of the target application program, the main page is controlled to send the operation request (the operation request is used for simulating the operation data executed by the source terminal for the target content locally displayed by the source terminal) to the second page based on the communication service of the target application program, so that the second page responds to the operation request to simulate the target content locally displayed by the target terminal to execute the operation data, and whether the debugging of the target application program is successful can be judged by whether the second page can successfully execute the operation content.
Further, in order to ensure that the subsequent debugging work of the target application program is smoothly carried out, after the main page acquires the operation request sent by the first page, the main page is controlled to return a first response result to the first page based on the communication service of the target application program; judging whether the main page successfully acquires the operation request sent by the first page according to the first response result, and controlling the main page to acquire a second response result from the second page based on the communication service of the target application program after the main page sends the operation request to the second page; and judging whether the response of the second page to the operation request is successful or not according to the second response result.
Specifically, for example, assume that the operation request triggered by the user on the first page is: the button is pressed, and the response result of the first page to the operation request response to the button is: and transmitting a small ball, and at the moment, if the first response result returned by the main page to the first page based on the communication service of the target application program is that the small ball is transmitted, determining that the operation request sent by the first page is successfully acquired by the main page. And after the main page sends the operation request to the second page, controlling the main page to acquire a second response result from the second page based on the communication service of the target application program, if the second response result is a small ball, determining that the second page is successful in responding to the operation request, otherwise, if the second response result is no response or different from the first response result, determining that the second page is failed in responding to the operation request. It should be appreciated that if the second page fails to respond to the operation request, it indicates that the target application was not successfully debugged.
It should be noted that, the source page in the target application program of the first page simulation and the destination page in the target application program of the second page simulation may be a top page opened by the target application program, or may be any designated page opened by the target application program. For the first page and the second page, the main page can be simply understood as a large browser page, and the first page and the second page are two small pages that are split in the large browser page. The target application may be various types of applications, such as a property application, a shopping application, a learning application, and the like, which are not limited herein. In addition, the target application program can also be an application program running in a local operating system of the terminal equipment, which is also called as a native application.
In the embodiment of the present application, in order to enable the operation request to be sent to the main page quickly, a preset application programming interface (Application Programming Interface, abbreviated as API) may be disposed on the main page, where the application programming interface simulates a communication service of the target application by encapsulating a communication manner of the target application, and the operation request sent by the first page is sent by calling the application programming interface by the first page.
When the method is implemented, an operation request triggered by a user on the first page is responded, the first page is controlled to call an application programming interface of the main page, and the operation request can be sent to the main page. When the operation request is triggered on the first page, the function with the same name as the operation request in the main page can be directly controlled to be called by the first page.
Based on the above, according to the communication method of the application program provided by the embodiment of the application, the main page is controlled to acquire the operation request sent by the first page based on the communication service of the target application program, so that the operation data executed by the source terminal for the target content locally displayed by the source terminal can be simulated. And the second page can respond to the operation request by controlling the main page to send the operation request to the second page based on the communication service of the target application program, simulate the target content locally displayed by the target terminal to execute the operation data, and judge whether the debugging of the target application program is successful or not by judging whether the second page can successfully execute the operation content. The application simulates the communication service of the target application program through the main page, simulates the source terminal and the second terminal through the first page and the second page respectively, and communicates based on the communication service, thus the debugging of the target application program can be completed, the whole process can complete the debugging work of the target application program at the front end without using two terminal devices and servers, the cost is lower, and the debugging efficiency is higher.
The following provides specific examples of scenarios to illustrate the application:
scene embodiment one:
assuming that the target application is a property transaction type application and the current scenario is a scenario that an intermediary or a homeowner uses Virtual Reality (VR) to remotely take a look, it should be understood that, with the continuous development of technology, when a user now wants to rent or buy a room in a certain city, the user may not reach the scene for various reasons, and when the user takes a view of a certain set of rooms, the homeowner having ownership of the room or an intermediary authorized by the homeowner can reach the scene of the room, and the homeowner can remotely take the look of the house through the VR technology.
When the method is implemented, a CPU responds to a house owner or an intermediary to trigger a house rotation request on a first page, the house rotation request is sent to a main page, the main page returns a first response result to the first page based on communication service of the house transaction application program, and if the first response result is a picture for displaying the house to rotate, the main page is determined to successfully acquire an operation request sent by the first page. And the communication service of the control main page based on the real estate transaction application program sends a house rotation request to the second page, the communication service of the control main page based on the real estate transaction application program obtains a second response result from the second page, and if the second response result is a picture for displaying the house to rotate, the response of the second page to the operation request is determined to be successful.
It should be noted that, in this embodiment, only the test for the house rotation function in the house property transaction type application program is illustrated, that is, the first page and the second page are corresponding to the house rotation interface in the house property transaction type application program, and in the actual house property transaction type application program debugging, there are many functions that need to be debugged, such as house decoration style transformation, house transaction, etc., besides the house rotation function, so that a plurality of first response results and a plurality of second response results will be generated. If all the first response results and the second response results are the same, the first page and the second page are determined to be normally communicated, namely the real estate transaction type application program is successfully debugged, namely the target application program is normal, otherwise, the debugging is failed. In practical applications, the house transaction application may be installed on homeowners, intermediaries, and user terminal devices to complete the house watching operation.
Scene embodiment two:
if the target application program is a game application program and the current scene is a battle scene of a game character, in the implementation, the CPU responds to a sword swinging operation request of the game character triggered by a user on a first page, the sword swinging operation request is sent to a main page, the main page returns a first response result to the first page based on communication service of the game application program, and if the first response result is a picture of the game character swinging, the main page is determined to successfully acquire the operation request sent by the first page. And the control main page sends a sword swinging operation request to the second page based on the communication service of the game application program, the control main page obtains a second response result from the second page based on the communication service of the game application program, and if the second response result is a picture of the game character sword swinging, the control main page determines that the response of the second page to the operation request is successful.
In this embodiment, only the test for the game character sword swinging function in the game application is exemplified, that is, the first page and the second page correspond to the game character sword swinging interface in the game application, but in the actual game application debugging, there are many functions, such as the game character reverse operation, the game character flying operation, and the like, which generate a plurality of first response results and a plurality of second response results, besides the game character sword swinging function. If all the first response results and the second response results are the same, the first page and the second page are determined to be normally communicated, namely the game application program is successfully debugged, namely the target application program is normal, otherwise, the debugging fails.
Scene embodiment three:
assuming that the target application program is a learning application program and the current scene is a scene for solving problems according to the problems, in the implementation, the CPU responds to a user to trigger a problem solving operation request aiming at the problems on a first page, the problem solving operation request is sent to a main page, the main page returns a first response result to the first page based on the communication service of the learning application program, and if the first response result is that the problem solving result aiming at the problems is displayed, the main page is determined to successfully acquire the operation request sent by the first page. And the control main page sends a problem solving operation request to the second page based on the communication service of the learning application program, acquires a second response result from the second page based on the communication service of the learning application program, and determines that the response of the second page to the operation request is successful if the second response result is the problem solving result displayed for the problem.
It should be noted that, in this embodiment, only the test of the problem solving operation function for the problem in the learning application program is illustrated, that is, the first page and the second page are corresponding to the problem solving interface in the learning application program, and in the actual debugging of the learning application program, there are many functions to be debugged, such as teaching video publishing, teaching video playing, etc., besides the problem solving function, so that a plurality of first response results and a plurality of second response results are generated. If all the first response results and the second response results are the same, the first page and the second page are determined to be normally communicated, namely the learning application program is successfully debugged, namely the target application program is normal, otherwise, the debugging fails.
Fig. 2 is a display method of a first page provided in an embodiment of the present application, in the embodiment of the present application, a main page has a first iframe tag and a second iframe tag that are configured in advance and respectively correspond to the first page, and the first iframe tag and the second iframe tag have URL addresses of target servers corresponding to target applications, as shown in fig. 2, before the main page is controlled to obtain an operation request sent by the first page based on a communication service of the target applications, the method further includes:
Step 201, the control main page obtains a first page loading request sent by a first page based on a communication service of a target application program, wherein the first page loading request comprises a first request identification matched with a first iframe tag.
Step 202, the control main page obtains a first iframe label according to the first request identifier, and obtains a URL address corresponding to the target application program according to the first iframe label.
Step 203, controlling the main page to load the URL address.
And 204, controlling the main page to send the target content loaded by the URL address to the first page so as to enable the first page to display the target content.
In practical application, for example, when the target application program is a property transaction application program, the CPU controls the main page to obtain a first page loading request sent by the first page based on a communication service of the property transaction application program, obtains a first iframe tag according to a first request identifier in the first page loading request, obtains a URL address corresponding to the property transaction application program according to the first iframe tag, then controls the main page to load the URL address, and sends target content loaded by the URL address to the first page, so that the target content can be displayed on the first page, wherein the target content can be a first page or any designated interface of the property transaction application program, and the page can contain multiple interface elements such as a second hand room, a new room, a rented room, and the like, for example.
Fig. 3 is a schematic diagram of a method for displaying a second page according to an embodiment of the present application, where, as shown in fig. 3, before controlling a main page to send an operation request to the second page based on a communication service of a target application, the method further includes:
step 301, the control main page obtains a second page loading request sent by a second page based on the communication service of the target application program, wherein the second page loading request comprises a second request identification matched with a second iframe tag.
Step 302, the control main page obtains a second iframe label according to the second request identifier, and obtains a URL address corresponding to the target application program according to the second iframe label.
Step 303, controlling the main page to load the URL address.
And 304, controlling the main page to send the target content loaded by the URL address to the second page so as to enable the second page to display the target content.
In practical application, for example, when the target application program is a property transaction application program, the CPU controls the main page to obtain a second page loading request sent by a second page based on a communication service of the property transaction application program, obtains a second iframe tag according to a second request identifier in the second page loading request, obtains a URL address corresponding to the property transaction application program according to the second iframe tag, and then controls the main page to load the URL address, and sends target content loaded by the URL address to the second page, so that the target content can be displayed on the second page, wherein the target content can be a first page or any designated interface of the property transaction application program, and the page can contain multiple interface elements such as a second hand room, a new room, a rented room, and the like, for example.
After the loading of the first page and the second page is completed, responding to a new room loading request triggered by a user in the first page, controlling the first page to send the new room loading request to the main page, returning a first response result to the first page by the main page based on the communication service of the real estate transaction application program, and if the first response result is that a plurality of new rooms for sale are displayed, determining that the main page successfully acquires the operation request sent by the first page. And the communication service of the control main page based on the real estate transaction application program sends a house rotation request to the second page, the control main page based on the communication service of the real estate transaction application program obtains a second response result from the second page, and if the second response result shows a plurality of new houses for sale, the response of the second page to the operation request is determined to be successful.
Fig. 4 is a schematic structural diagram of an application program debugging device provided in an embodiment of the present application, where a front end is provided with a main page, a first page and a second page, where the main page is used for simulating a communication service of a target application program, the first page is used for simulating and displaying a source page in the target application program of a source terminal, the second page is used for simulating and displaying a destination page in the target application program of a destination terminal, and at least some identical target contents of the source page and the destination page exist in the first page and the second page, and the device includes:
The first communication module 401 is configured to control the main page to acquire, based on a communication service of the target application program, an operation request sent by the first page, where the operation request includes operation data for simulating that the source terminal performs on target content locally displayed by the source terminal.
The second communication module 402 is configured to control the main page to send an operation request to the second page based on the communication service of the target application program, so that the second page responds to the operation request, and simulate the destination terminal to execute operation data for the target content locally displayed by the destination terminal.
In an alternative embodiment, the apparatus further comprises: the first judging module is used for controlling the main page to acquire a second response result from the second page based on the communication service of the target application program after the main page sends the operation request to the second page; and judging whether the response of the second page to the operation request is successful or not according to the second response result.
In an alternative embodiment, the apparatus further comprises: the second judging module is used for controlling the main page to return a first response result to the first page based on the communication service of the target application program after the main page acquires the operation request sent by the first page; and judging whether the main page successfully acquires the operation request sent by the first page according to the first response result.
In an alternative embodiment, the main page is provided with a set application programming interface, and the application programming interface is used for simulating the communication service of the target application program by encapsulating the communication mode of the target application program; the operation request sent by the first page is sent by the first page calling application programming interface.
In an alternative embodiment, the main page has a first iframe tag and a second iframe tag which are preconfigured and respectively correspond to the first page and the second page, and URL addresses of target servers corresponding to the target application programs are located in the first iframe tag and the second iframe tag, and the device further includes: the first control module is used for controlling the main page to acquire a first page loading request sent by a first page based on the communication service of the target application program, wherein the first page loading request comprises a first request identification matched with a first iframe tag; the control main page obtains a first iframe label according to the first request identifier, and obtains a URL address corresponding to the target application program according to the first iframe label; controlling the main page to load the URL address; and controlling the main page to send the target content loaded by the URL address to the first page so that the first page displays the target content.
In an alternative embodiment, the apparatus further comprises: the second control module is used for controlling the main page to acquire a second page loading request sent by a second page based on the communication service of the target application program, wherein the second page loading request comprises a second request identification matched with a second iframe label; the control main page obtains a second iframe label according to the second request identifier, and obtains a URL address corresponding to the target application program according to the second iframe label; controlling the main page to load the URL address; and controlling the main page to send the target content loaded by the URL address to the second page so that the second page displays the target content.
The embodiment of the application also provides electronic equipment which can be a desktop computer, a notebook computer, a tablet personal computer, a smart phone, a digital assistant, intelligent wearable equipment, a shopping guide terminal, an intelligent television and the like. Fig. 5 is a schematic structural diagram of an electronic device according to an embodiment of the present application, where, as shown in fig. 5, the electronic device includes: a processor 51 and a memory 52 storing a computer program; wherein the processor 51 and the memory 52 may be one or more.
The memory 52 is mainly used for storing computer programs, and the computer programs can be executed by the processor 51, so that the processor 51 controls the electronic device to realize corresponding functions and complete corresponding actions or tasks. In addition to storing computer programs, the memory 52 may also be configured to store various other data to support operations on the electronic device. Examples of such data include instructions for any application or method operating on an electronic device.
The memory 52 may be implemented by any type or combination of volatile or nonvolatile memory devices such as Static Random Access Memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic or optical disk.
In the embodiment of the present application, the implementation form of the processor 51 is not limited, and may be, for example, but not limited to, a CPU, GPU, MCU, or the like. The processor 51 may be regarded as a control system of the electronic device and may be used to execute computer programs stored in the memory 52 for controlling the electronic device to perform the respective functions, to perform the respective actions or tasks. It should be noted that, depending on the implementation form and the scene of the electronic device, the functions, actions or tasks to be implemented may be different; accordingly, the computer programs stored in the memory 52 may also vary, and execution of the different computer programs by the processor 51 may control the electronic device to perform different functions, perform different actions or tasks.
In some alternative embodiments, as shown in fig. 5, the electronic device may further include: display 53, power supply assembly 54, and communication assembly 55. The illustration of only a portion of the components in fig. 5 is not meant to imply that the electronic device comprises only the components shown in fig. 5, but that the electronic device may also comprise other components for different application needs, e.g. in case of a voice interaction need, as shown in fig. 5, the electronic device may also comprise an audio component 56. The components that the electronic device may include may depend on the product form of the electronic device, and are not limited herein.
The display 53 is used to display a UI (User Interface). The UI may include images, text, icons, video, and any combination thereof. When the display 53 is a touch screen, the display 53 also has the ability to collect touch signals at or above the surface of the display 53. The touch signal may be input as a control signal to the processor 51 for processing. At this time, the display 53 may also be used to provide virtual buttons and/or virtual keyboards, also referred to as soft buttons and/or soft keyboards. In some embodiments, the display 53 may be one, providing a front panel of the electronic device; in other embodiments, the display 53 may be at least two, respectively disposed on different surfaces of the electronic device or in a folded design; in still other embodiments, the display 53 may be a flexible display screen disposed on a curved surface or a folded surface of the electronic device. Even more, the display 53 may be arranged as a non-rectangular irregular image, i.e. a shaped screen. The display 53 may be made of LCD (Liquid Crystal Display ), OLED (Organic Light-Emitting Diode) or other materials.
The power supply assembly 54 is used to power the various components in the electronic device. The power supply assembly 54 may be an alternating current, a direct current, a disposable battery, or a rechargeable battery. When the power supply assembly 54 includes a rechargeable battery, the rechargeable battery may support wired or wireless charging. The rechargeable battery may also be used to support fast charge technology.
The communication component 55 is used to receive and transmit RF (Radio Frequency) signals, also known as electromagnetic signals. The communication component 55 communicates with a communication network and other communication devices via electromagnetic signals. The communication component 55 converts electrical signals to electromagnetic signals for transmission, or converts received electromagnetic signals to electrical signals. Optionally, the communication component 55 includes: antenna systems, RF transceivers, one or more amplifiers, tuners, oscillators, digital signal processors, codec chipsets, subscriber identity module cards, and so forth. The communication component 55 can communicate with other terminals via at least one wireless communication protocol. The wireless communication protocol includes, but is not limited to: metropolitan area networks, various generations of mobile communication networks (2G, 3G, 4G, and 5G), wireless local area networks, and/or WiFi (Wireless Fidelity ) networks. In some embodiments, the radio frequency circuitry 1104 may also include NFC (Near Field Communication, short-range wireless communication) related circuitry, which is not limiting of the application.
The audio component 56 may include a microphone and a speaker. The microphone is used for collecting sound waves of users and environments, converting the sound waves into electric signals, and inputting the electric signals to the processor 51 for processing, or inputting the electric signals to the communication component 55 for voice communication. For the purpose of stereo acquisition or noise reduction, a plurality of microphones may be respectively disposed at different positions of the electronic device. The microphone may also be an array microphone or an omni-directional pickup microphone. The speaker is used to convert electrical signals from the processor 51 or the communication component 55 into sound waves. The speaker may be a conventional thin film speaker or a piezoelectric ceramic speaker. When the speaker is a piezoelectric ceramic speaker, not only the electric signal can be converted into a sound wave audible to humans, but also the electric signal can be converted into a sound wave inaudible to humans for ranging and other purposes. In some embodiments, the audio component 56 may also include a headphone jack.
Accordingly, the present application also provides a computer readable storage medium storing a computer program, where the computer program is executed to implement the steps executable by the electronic device in the above method embodiments.
Accordingly, embodiments of the present application also provide a computer program product, including a computer program/instruction, which when executed by a processor is capable of implementing any of the steps of the above-described componentized route implementation method embodiments.
The communication assembly of the above embodiments is configured to facilitate wired or wireless communication between the device in which the communication assembly is located and other devices. The device where the communication component is located can access a wireless network based on a communication standard, such as a mobile communication network of WiFi,2G, 3G, 4G/LTE, 5G, etc., or a combination thereof. In one exemplary embodiment, the communication component receives a broadcast signal or broadcast-related information from an external broadcast management system via a broadcast channel. In one exemplary embodiment, the communication component further comprises a Near Field Communication (NFC) module to facilitate short range communications. For example, the NFC module may be implemented based on Radio Frequency Identification (RFID) technology, infrared data association (IrDA) technology, ultra Wideband (UWB) technology, bluetooth (BT) technology, and other technologies.
The display in the above-described embodiments includes a screen, which may include a Liquid Crystal Display (LCD) and a Touch Panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive input signals from a user. The touch panel includes one or more touch sensors to sense touches, swipes, and gestures on the touch panel. The touch sensor may sense not only the boundary of a touch or slide action, but also the duration and pressure associated with the touch or slide operation.
The power supply assembly in the above embodiment provides power for various components of the device in which the power supply assembly is located. The power components may include a power management system, one or more power sources, and other components associated with generating, managing, and distributing power for the devices in which the power components are located.
The audio component of the above embodiments may be configured to output and/or input audio signals. For example, the audio component includes a Microphone (MIC) configured to receive external audio signals when the device in which the audio component is located is in an operational mode, such as a call mode, a recording mode, and a speech recognition mode. The received audio signal may be further stored in a memory or transmitted via a communication component. In some embodiments, the audio assembly further comprises a speaker for outputting audio signals.
It will be appreciated by those skilled in the art that embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present application is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems) and computer program products according to embodiments of the application. It will be understood that each flow and/or block of the flowchart illustrations and/or block diagrams, and combinations of flows and/or blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
In one typical configuration, a computing device includes one or more processors (CPUs), input/output interfaces, network interfaces, and memory.
The memory may include volatile memory in a computer-readable medium, random Access Memory (RAM) and/or nonvolatile memory, such as Read Only Memory (ROM) or flash memory (flash RAM). Memory is an example of computer-readable media.
Computer readable media, including both non-transitory and non-transitory, removable and non-removable media, may implement information storage by any method or technology. The information may be computer readable instructions, data structures, modules of a program, or other data. Examples of storage media for a computer include, but are not limited to, phase change memory (PRAM), static Random Access Memory (SRAM), dynamic Random Access Memory (DRAM), other types of Random Access Memory (RAM), read Only Memory (ROM), electrically Erasable Programmable Read Only Memory (EEPROM), flash memory or other memory technology, compact disc read only memory (CD-ROM), digital Versatile Discs (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices, or any other non-transmission medium, which can be used to store information that can be accessed by a computing device. Computer-readable media, as defined herein, does not include transitory computer-readable media (transmission media), such as modulated data signals and carrier waves.
It should also be noted that the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one … …" does not exclude the presence of other like elements in a process, method, article or apparatus that comprises the element.
The foregoing is merely exemplary of the present application and is not intended to limit the present application. Various modifications and variations of the present application will be apparent to those skilled in the art. Any modification, equivalent replacement, improvement, etc. which come within the spirit and principles of the application are to be included in the scope of the claims of the present application.

Claims (7)

1. The communication method of an application program is characterized in that a main page, a first page and a second page are arranged at the front end, wherein the main page is used for simulating communication services of a target application program, the first page is used for simulating and displaying a source page in the target application program of a source terminal, the second page is used for simulating and displaying a destination page in the target application program of a destination terminal, at least partial same target content of the source page and the destination page exists in the first page and the second page, a first iframe tag corresponding to the first page and a second iframe tag corresponding to the second page are arranged in the main page in advance, and URL addresses of a target server corresponding to the target application program are arranged in the first iframe tag and the second iframe tag, and the method comprises the following steps:
Controlling the main page to acquire a first page loading request sent by the first page based on the communication service of the target application program, wherein the first page loading request comprises a first request identification matched with the first iframe tag; controlling the main page to acquire the first iframe tag according to the first request identifier, and acquiring a URL address corresponding to the target application program according to the first iframe tag;
controlling the main page to load the URL address;
controlling the main page to send target content loaded by the URL address to the first page so that the first page displays the target content;
controlling the main page to acquire an operation request sent by the first page based on a communication service of the target application program, wherein the operation request comprises operation data for simulating the execution of the source terminal for the target content locally displayed by the source terminal;
controlling the main page to acquire a second page loading request sent by the second page based on the communication service of the target application program, wherein the second page loading request comprises a second request identification matched with the second iframe tag; controlling the main page to acquire the second iframe tag according to the second request identifier, and acquiring the URL address corresponding to the target application program according to the second iframe tag;
Controlling the main page to load the URL address;
controlling the main page to send target content loaded by the URL address to the second page so that the second page displays the target content;
controlling the main page to send the operation request to the second page based on the communication service of the target application program, so that the second page responds to the operation request and simulates the target terminal to execute the operation data aiming at the target content locally displayed by the target terminal;
and determining whether the debugging of the target application program is successful according to whether the second page successfully executes the operation data.
2. The method of claim 1, wherein the step of determining the position of the substrate comprises,
after the main page sends the operation request to the second page, controlling the main page to acquire a second response result from the second page based on the communication service of the target application program;
and judging whether the response of the second page to the operation request is successful or not according to the second response result.
3. The method of claim 1, wherein the step of determining the position of the substrate comprises,
after the main page acquires the operation request sent by the first page, controlling the main page to return a first response result to the first page based on the communication service of the target application program;
Judging whether the main page successfully acquires the operation request sent by the first page or not according to the first response result.
4. The method according to claim 1, wherein the main page is provided with a set application programming interface for simulating a communication service of the target application by encapsulating a communication manner of the target application;
the operation request sent by the first page is sent by the first page calling the application programming interface.
5. The communication device of an application program is characterized in that a main page, a first page and a second page are arranged at the front end, wherein the main page is used for simulating communication services of a target application program, the first page is used for simulating and displaying a source page in the target application program of a source terminal, the second page is used for simulating and displaying a destination page in the target application program of a destination terminal, at least partial same target content of the source page and the destination page exists in the first page and the second page, a first iframe tag corresponding to the first page and a second iframe tag corresponding to the second page are arranged in the main page in advance, and URL addresses of a target server corresponding to the target application program are arranged in the first iframe tag and the second iframe tag, and the device comprises:
The first communication module is used for controlling the main page to acquire a first page loading request sent by the first page based on the communication service of the target application program, wherein the first page loading request comprises a first request identification matched with the first iframe tag; controlling the main page to acquire the first iframe tag according to the first request identifier, and acquiring a URL address corresponding to the target application program according to the first iframe tag; controlling the main page to load the URL address; controlling the main page to send target content loaded by the URL address to the first page so that the first page displays the target content; controlling the main page to acquire an operation request sent by the first page based on a communication service of the target application program, wherein the operation request comprises operation data for simulating the execution of the source terminal for the target content locally displayed by the source terminal;
the second communication module is used for controlling the main page to acquire a second page loading request sent by the second page based on the communication service of the target application program, wherein the second page loading request comprises a second request identifier matched with the second iframe tag; controlling the main page to acquire the second iframe tag according to the second request identifier, and acquiring the URL address corresponding to the target application program according to the second iframe tag; controlling the main page to load the URL address; controlling the main page to send target content loaded by the URL address to the second page so that the second page displays the target content; and controlling the main page to send the operation request to the second page based on the communication service of the target application program, so that the second page responds to the operation request, simulating the target terminal to execute the operation data aiming at the target content locally displayed by the target terminal, and determining whether the debugging of the target application program is successful according to whether the second page successfully executes the operation data.
6. An electronic device, comprising:
a processor;
a memory for storing the processor-executable instructions;
wherein the processor is configured to execute the instructions to implement the communication method of an application program according to any one of claims 1 to 4.
7. A computer readable storage medium, characterized in that instructions in the computer readable storage medium, when executed by a processor of an electronic device, enable the electronic device to perform the communication method of an application program according to any one of claims 1 to 4.
CN202211516413.6A 2022-11-29 2022-11-29 Communication method and device of application program, electronic equipment and storage medium Active CN115794634B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211516413.6A CN115794634B (en) 2022-11-29 2022-11-29 Communication method and device of application program, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211516413.6A CN115794634B (en) 2022-11-29 2022-11-29 Communication method and device of application program, electronic equipment and storage medium

Publications (2)

Publication Number Publication Date
CN115794634A CN115794634A (en) 2023-03-14
CN115794634B true CN115794634B (en) 2023-12-01

Family

ID=85443399

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211516413.6A Active CN115794634B (en) 2022-11-29 2022-11-29 Communication method and device of application program, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN115794634B (en)

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106201562A (en) * 2015-04-30 2016-12-07 深圳市腾讯计算机系统有限公司 A kind of page switching method and device
CN110457610A (en) * 2019-06-27 2019-11-15 五八有限公司 Information recommendation method, device, terminal, server and storage medium
CN110598147A (en) * 2019-07-30 2019-12-20 东软集团股份有限公司 Cross-domain communication method, device and equipment
CN113238881A (en) * 2021-05-28 2021-08-10 北京达佳互联信息技术有限公司 Page communication method and device
CN114385939A (en) * 2020-10-22 2022-04-22 腾讯科技(深圳)有限公司 Application display method, application display system, application display device and application display equipment
CN114721927A (en) * 2021-01-04 2022-07-08 腾讯科技(深圳)有限公司 Page test information acquisition method and device, computer equipment and storage medium
CN115272623A (en) * 2022-07-18 2022-11-01 上海瑞家信息技术有限公司 Online tape viewing method, device, equipment and storage medium

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106201562A (en) * 2015-04-30 2016-12-07 深圳市腾讯计算机系统有限公司 A kind of page switching method and device
CN110457610A (en) * 2019-06-27 2019-11-15 五八有限公司 Information recommendation method, device, terminal, server and storage medium
CN110598147A (en) * 2019-07-30 2019-12-20 东软集团股份有限公司 Cross-domain communication method, device and equipment
CN114385939A (en) * 2020-10-22 2022-04-22 腾讯科技(深圳)有限公司 Application display method, application display system, application display device and application display equipment
CN114721927A (en) * 2021-01-04 2022-07-08 腾讯科技(深圳)有限公司 Page test information acquisition method and device, computer equipment and storage medium
CN113238881A (en) * 2021-05-28 2021-08-10 北京达佳互联信息技术有限公司 Page communication method and device
CN115272623A (en) * 2022-07-18 2022-11-01 上海瑞家信息技术有限公司 Online tape viewing method, device, equipment and storage medium

Also Published As

Publication number Publication date
CN115794634A (en) 2023-03-14

Similar Documents

Publication Publication Date Title
US11158102B2 (en) Method and apparatus for processing information
KR102248474B1 (en) Voice command providing method and apparatus
EP3207757B1 (en) Method, electronic device and computer program for connecting to external devices
KR102178892B1 (en) Method for providing an information on the electronic device and electronic device thereof
CN105117337B (en) Using adjustment method, client and debugging platform
US20200258517A1 (en) Electronic device for providing graphic data based on voice and operating method thereof
CN106133826A (en) For the self-defining flexible modes of language model
CN105159672A (en) Remote assistance method and client
CN110581919A (en) Information transmission and data processing method, device, system and storage medium
US20230094172A1 (en) Cross-Device Application Invoking Method and Electronic Device
CN105516270A (en) Information push method and device
CN112420217B (en) Message pushing method, device, equipment and storage medium
WO2022078295A1 (en) Device recommendation method and electronic device
CN106357485A (en) Method and device for marking equipment
CN108536415A (en) Using method for controlling volume, device, mobile terminal and computer-readable medium
CN108600529A (en) Information interacting method, device and computer readable storage medium
CN105354017A (en) Information processing method and apparatus
CN110968362B (en) Application running method, device and storage medium
KR102226817B1 (en) Method for reproducing contents and an electronic device thereof
CN105407160A (en) Interface display method and device
CN112738774A (en) Application sharing method and device, terminal and computer readable storage medium
CN115794634B (en) Communication method and device of application program, electronic equipment and storage medium
CN108108206A (en) Mobile payment cut-in method and device
WO2023005711A1 (en) Service recommendation method and electronic device
KR101987463B1 (en) Mobile terminal and method for controlling of the same

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