CN114924826B - Page fusion method, device and equipment based on different code platforms - Google Patents

Page fusion method, device and equipment based on different code platforms Download PDF

Info

Publication number
CN114924826B
CN114924826B CN202210648809.XA CN202210648809A CN114924826B CN 114924826 B CN114924826 B CN 114924826B CN 202210648809 A CN202210648809 A CN 202210648809A CN 114924826 B CN114924826 B CN 114924826B
Authority
CN
China
Prior art keywords
electronic device
script
page
information
updated
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
CN202210648809.XA
Other languages
Chinese (zh)
Other versions
CN114924826A (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 Baidu Netcom Science and Technology Co Ltd
Original Assignee
Beijing Baidu Netcom Science and 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 Baidu Netcom Science and Technology Co Ltd filed Critical Beijing Baidu Netcom Science and Technology Co Ltd
Priority to CN202210648809.XA priority Critical patent/CN114924826B/en
Publication of CN114924826A publication Critical patent/CN114924826A/en
Application granted granted Critical
Publication of CN114924826B publication Critical patent/CN114924826B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • 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/44Arrangements for executing specific programs
    • G06F9/451Execution arrangements for user interfaces
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/70Software maintenance or management
    • G06F8/76Adapting program code to run in a different environment; Porting
    • 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/44Arrangements for executing specific programs
    • G06F9/445Program loading or initiating
    • G06F9/44521Dynamic linking or loading; Link editing at or after load time, e.g. Java class loading
    • G06F9/44526Plug-ins; Add-ons

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Human Computer Interaction (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

The disclosure provides a page fusion method, device and equipment based on different code platforms, relates to the field of computers, in particular to the field of software development and cloud service, and can be applied to an enterprise application development scene. The method is applied to a first electronic device, and comprises the following steps: if the current page is determined to need to be updated, updated script codes corresponding to the current page in the second electronic equipment are obtained; the current page is a page on an interface displayed by a first client corresponding to the first electronic device, and the current page is a page obtained based on script codes provided by the second electronic device; the first electronic device and the second electronic device are devices running different script codes; and updating the current page according to the updated script code. By the method, the user can display the updated page in the first client without refreshing the page, so that the operation times of the user are reduced, and the user experience is improved.

Description

Page fusion method, device and equipment based on different code platforms
Technical Field
The disclosure relates to the field of computer, in particular to the field of software development and cloud service, and can be applied to an enterprise application development scene, in particular to a page fusion method, device and equipment based on different code platforms.
Background
With the continuous development of application development, different code platforms are provided to meet the development requirements of users. A first code platform (i.e., a low code platform) may be provided that operates based on the first electronic device; the first code platform comprises packaged pages, and the pages are provided with script codes. The second code platform is also provided and operates based on the second electronic equipment; the pages in the second code platform are developed independently by the user.
How to process the page provided by the first code platform to automatically update the page and further reduce the page refreshing action is a problem to be solved.
Disclosure of Invention
The disclosure provides a page fusion method, device and equipment based on different code platforms for reducing page refreshing actions.
According to a first aspect of the present disclosure, there is provided a page fusion method based on different code platforms, the method being applied to a first electronic device, the method comprising:
If the current page is determined to need to be updated, acquiring updated script codes corresponding to the current page in the second electronic equipment; the current page is a page on an interface displayed by a first client corresponding to the first electronic device, and the current page is a page obtained based on script codes provided by the second electronic device; the first electronic device and the second electronic device are devices running different script codes;
and updating the current page according to the updated script code.
According to a second aspect of the present disclosure, there is provided a page fusion method based on a different code platform, the method being applied to a second electronic device, the method comprising:
receiving a first acquisition request sent by first electronic equipment; the first acquisition request is used for indicating to acquire updated script codes of a current page, and the first acquisition request is sent when the current page is determined to need updating; the current page is a page on an interface displayed by a first client corresponding to the first electronic device, and the current page is a page obtained based on script codes provided by the second electronic device; the first electronic device and the second electronic device are devices running different script codes;
According to the first acquisition request, script information is fed back to the first electronic equipment; wherein the script information is used for indicating an address for storing the updated script code; the script information is used for acquiring the updated script code; the updated script code is used for updating the current page.
According to a third aspect of the present disclosure, there is provided a page fusion apparatus based on different code platforms, the apparatus being applied to a first electronic device, the apparatus comprising:
the first determining unit is used for determining that the current page needs to be updated;
the first acquisition unit is used for acquiring updated script codes corresponding to the current page in the second electronic equipment; the current page is a page on an interface displayed by a first client corresponding to the first electronic device, and the current page is a page obtained based on script codes provided by the second electronic device; the first electronic device and the second electronic device are devices running different script codes;
and the updating unit is used for updating the current page according to the updated script code.
According to a fourth aspect of the present disclosure, there is provided a page fusion apparatus based on a different code platform, the apparatus being applied to a second electronic device, the apparatus comprising:
The second receiving unit is used for receiving a first acquisition request sent by the first electronic equipment; the first acquisition request is used for indicating to acquire updated script codes of a current page, and the first acquisition request is sent when the current page is determined to need updating; the current page is a page on an interface displayed by a first client corresponding to the first electronic device, and the current page is a page obtained based on script codes provided by the second electronic device; the first electronic device and the second electronic device are devices running different script codes;
the feedback unit is used for feeding back script information to the first electronic equipment according to the first acquisition request; wherein the script information is used for indicating an address for storing the updated script code; the script information is used for acquiring the updated script code; the updated script code is used for updating the current page.
According to a fifth aspect of the present disclosure, there is provided an electronic device comprising:
at least one processor; and
a memory communicatively coupled to the at least one processor; wherein, the liquid crystal display device comprises a liquid crystal display device,
The memory stores instructions executable by the at least one processor to enable the at least one processor to perform the method of the first aspect; or to enable the at least one processor to perform the method of the second aspect.
According to a sixth aspect of the present disclosure, there is provided a non-transitory computer readable storage medium storing computer instructions for causing the computer to perform the method of the first aspect; alternatively, the computer instructions are for causing the computer to perform the method of the second aspect.
According to a seventh aspect of the present disclosure, there is provided a computer program product comprising: a computer program stored in a readable storage medium, from which at least one processor of an electronic device can read, the at least one processor executing the computer program causing the electronic device to perform the method of the first aspect; alternatively, execution of the computer program by the at least one processor causes the electronic device to perform the method of the second aspect.
It should be understood that the description in this section is not intended to identify key or critical features of the embodiments of the disclosure, nor is it intended to be used to limit the scope of the disclosure. Other features of the present disclosure will become apparent from the following specification.
Drawings
The drawings are for a better understanding of the present solution and are not to be construed as limiting the present disclosure. Wherein:
FIG. 1 is a schematic diagram according to a first embodiment of the present disclosure;
FIG. 2 is an interface schematic diagram of a first client according to an embodiment of the disclosure;
FIG. 3 is a schematic diagram according to a second embodiment of the present disclosure;
fig. 4 is a signaling diagram according to a second embodiment of the present disclosure;
FIG. 5 is a schematic diagram according to a third embodiment of the present disclosure;
FIG. 6 is a schematic diagram according to a fourth embodiment of the present disclosure;
FIG. 7 is a schematic diagram according to a fifth embodiment of the present disclosure;
FIG. 8 is a schematic diagram according to a sixth embodiment of the present disclosure;
FIG. 9 is a schematic diagram according to a seventh embodiment of the present disclosure;
FIG. 10 is a schematic diagram according to an eighth embodiment of the present disclosure;
FIG. 11 is a schematic diagram according to a ninth embodiment of the present disclosure;
FIG. 12 is a block diagram of an electronic device for implementing a page fusion method based on different code platforms according to an embodiment of the present disclosure.
Detailed Description
Exemplary embodiments of the present disclosure are described below in conjunction with the accompanying drawings, which include various details of the embodiments of the present disclosure to facilitate understanding, and should be considered as merely exemplary. Accordingly, one of ordinary skill in the art will recognize that various changes and modifications of the embodiments described herein can be made without departing from the scope and spirit of the present disclosure. Also, descriptions of well-known functions and constructions are omitted in the following description for clarity and conciseness.
Currently, with the continuous development of application development, in order to meet the development requirements of different users, different code platforms are provided so that the users can perform application development in the different code platforms. For example, a first code platform may be provided that is a fast generation application development platform, i.e., a low code platform, without requiring a developer to encode or write a small amount of code. For example, when a user develops based on the first code platform, the development of the page in the application can be achieved by simply dragging and combining the components provided by the first code platform. In addition, a second code platform is provided, and a developer can independently develop an application page in the second code platform through expert knowledge.
When a user modifies a page code of a currently displayed interface of the first code platform, the user is usually required to manually refresh the current interface, and an interface corresponding to the updated page code is displayed on the first code platform.
How to realize automatic update of the page so as to reduce the refresh action of the user on the display page and improve the user experience is a problem to be solved.
To avoid at least one of the above technical problems, the inventors of the present disclosure have creatively worked to obtain the inventive concept of the present disclosure: when the first electronic device determines that the current page displayed by the first client corresponding to the first electronic device needs to be updated, the first electronic device acquires updated script codes corresponding to the current interface in the second electronic device, and then updates the current interface according to the updated script codes.
The disclosure provides a page fusion method based on different code platforms, relates to the field of computers, in particular to the field of software development and cloud service, and can be applied to an enterprise application development scene to achieve the display effect that a user can update a display interface without refreshing the display interface.
In the technical scheme of the disclosure, the related processes of collecting, storing, using, processing, transmitting, providing, disclosing and the like of the personal information of the user accord with the regulations of related laws and regulations, and the public order colloquial is not violated.
Fig. 1 is a schematic diagram of a first embodiment of the present disclosure, and as shown in fig. 1, a page fusion method based on different code platforms according to an embodiment of the present disclosure includes:
s101, if the first electronic device determines that the current page needs to be updated, acquiring updated script codes corresponding to the current page in the second electronic device; the current page is a page on an interface displayed by a first client corresponding to the first electronic device, and the current page is a page obtained based on script codes provided by the second electronic device; the first electronic device and the second electronic device are devices running different script codes.
The execution body of the present embodiment may be, for example, a first electronic device, where the first electronic device may be a terminal device, or a server, or other apparatus or device that may execute the method of the present embodiment.
The first electronic device in this embodiment may be an electronic device integrated with a database and a display function, where the database may be used to store script codes corresponding to pages developed based on the first code platform (i.e., the low code platform). And, the first electronic device has a display function, and a page can be displayed based on a first client running in the first electronic device.
Alternatively, in some embodiments, the first electronic device is configured to store script code developed by the first code platform, and the first electronic device is connected to a first terminal device, where a first client is running. The page corresponding to the script code stored in the first electronic device may be displayed based on the first client running in the first terminal device. That is, in the present application, the first client for displaying a page corresponding to the first electronic device may be running in the first electronic device, or may be running in a first terminal device connected to the first electronic device, which is not specifically limited in this embodiment.
In addition, different script codes are run in the first electronic device and the second electronic device, wherein the different script codes refer to script codes developed based on different code platforms. For example, script code corresponding to a page developed based on a first code platform may be stored in a first electronic device, while script code corresponding to a page developed based on a second code platform may be stored in a second electronic device. That is, in this embodiment, different pages in the same application may be developed in different code platforms, and eventually different pages in the same application developed by different code platforms are displayed on the same client.
In addition, the first client corresponding to the first electronic device in the embodiment may be used to display a page corresponding to the script code stored in the first electronic device, and may also be used to display a page corresponding to the script code stored in the second electronic device, that is, the first client corresponding to the first electronic device may be used to display a page corresponding to the script code developed based on different code platforms. In addition, trigger components of a plurality of pages are provided on the first client interface, and a user can switch to an application page corresponding to the trigger components by selecting the trigger components on the pages.
When the current page on the display interface of the first client corresponding to the first electronic device is the script code provided by the second electronic device, if the first electronic device determines that the script code corresponding to the current page is modified in the second electronic device and needs to update the display interface of the first client, at this time, the first electronic device acquires the script code updated by the current page from the second electronic device. The updated script code of the current page may be the script code corresponding to the updated portion when the updated script code of the current page is updated, or may be all the updated script codes corresponding to the current page.
S102, the first electronic device updates the current page according to the updated script code.
For example, after the first electronic device obtains the updated script code, the page on the interface displayed by the first client is updated based on the updated script code, and then displayed to the user.
For example, fig. 2 is an interface schematic diagram of a first client according to an embodiment of the disclosure. As shown in fig. 2, the display interface includes 4 trigger components, which are respectively a trigger component 1, a trigger component 2, a trigger component 3 and a trigger component 4, where each trigger component corresponds to a display page, and a user may display a page corresponding to the trigger component in a page display area by selecting the trigger component on the display interface. In addition, the display page of the first client in the embodiment may be a page developed by the first code platform, or may be a page developed by the second code platform. It should be noted that, the interface schematic diagram of the first client in the embodiment is merely illustrative, and the design of the display interface of the first client is not particularly limited.
In this embodiment, if it is determined by the first electronic device that the page of the interface displayed by the first client corresponding to the first electronic device needs to be updated, and the page of the current display interface of the first client is obtained based on the script code of the page provided by the second electronic device, the first electronic device may obtain the updated script code corresponding to the current page from the second electronic device, and display an update result on the first client corresponding to the first electronic device based on the updated script code. By the method, the updated page can be displayed in the first client without manually refreshing the page by a user, so that the operation times of the user are reduced, and the user experience is improved.
In order for the reader to more fully understand the principles of implementation of the present disclosure, the embodiment shown in fig. 1 will now be further refined in conjunction with fig. 3-5 below.
Fig. 3 is a schematic diagram according to a second embodiment of the present disclosure, and as shown in fig. 3, a page fusion method based on different code platforms provided in this embodiment includes:
s301, the first electronic equipment responds to a connection instruction input by a user, and establishes connection with the second electronic equipment according to a communication script indicated by the connection instruction; the connection instruction is used for indicating a communication script, and the communication script is used for establishing connection between the first electronic equipment and the second electronic equipment.
The execution body of the present embodiment may be, for example, a first electronic device, where the first electronic device may be a terminal device, or a server, or other apparatus or device that may execute the method of the present embodiment.
In this embodiment, the first electronic device may establish a communication connection with the second electronic device based on the communication script indicated by the connection instruction input to the first electronic device by the user, so that the subsequent second electronic device may send information to the first electronic device based on the established communication connection.
In one example, the address of the first electronic device and the address of the second electronic device are preset in the communication script, and further the first electronic device and the second electronic device can implement communication based on the address of the first electronic device and the address of the second electronic device in the communication script.
In one example, the first electronic device and the second electronic device may communicate using socket communication. The communication script may be a socket communication script written by a user.
S302, the first electronic device receives a first hash value sent by the second electronic device, wherein the first hash value is used for indicating updated script codes.
For example, when the second electronic device detects that the script code of the current page of the display interface of the first client is updated in the second client, the second electronic device generates a first hash value corresponding to the updated script code. The second electronic device then sends the generated first hash value to the first electronic device.
S303, if the first electronic device determines that the first hash value is different from a pre-stored second hash value, determining that the current page needs to be updated; the pre-stored second hash value is used for indicating the script code before updating of the current page. The current page is a page on an interface displayed by a first client corresponding to the first electronic device, and the current page is a page obtained based on script codes provided by the second electronic device; the first electronic device and the second electronic device are devices running different script codes.
After receiving the first hash value sent by the second electronic device, the first electronic device compares the first hash value with a second hash value of a current page corresponding to a display interface of the first client, which is previously stored, and if the first electronic device determines that the first hash value is different from the second hash value, the first electronic device determines that the current page needs to be updated.
It can be understood that when the second electronic device detects that the script code corresponding to the current page is updated, the second electronic device sends a first hash value corresponding to the script code updated by the current page to the first electronic device at this time, and after the first electronic device compares the first hash value with the second hash value, if the first hash value is inconsistent with the second hash value, the first electronic device determines that the current page of the display interface of the first client needs to be updated. By the method, the first electronic device determines that the script codes in the second electronic device are updated, so that the first electronic device can acquire the updated script codes and update the current page, and the operation of refreshing the page by a user is reduced.
S304, the first electronic device sends a first acquisition request to the second electronic device, wherein the first acquisition request is used for indicating to acquire updated script codes.
When the first electronic device determines that the current page needs to be updated, the first electronic device sends a first acquisition request to the second electronic device, so that the first electronic device acquires updated script codes in the second electronic device.
In one example, step 304 "send a first acquisition request to a second electronic device" may be implemented by: and sending a first acquisition request to the second electronic equipment based on the pre-stored address information of the second electronic equipment.
For example, when the first electronic device sends the first acquisition request to the second electronic device, the first electronic device may send the first acquisition request based on address information of the second electronic device stored in the first electronic device in advance, so as to ensure validity of the first electronic device sending the first acquisition request to the second electronic device.
S305, script information sent by the second electronic device and received by the first electronic device is used for indicating an address for storing the updated script code.
For example, after the first electronic device sends the first acquisition request to the second electronic device, the second electronic device may feed back, to the first electronic device, a storage address for characterizing the updated script code in the second electronic device based on the first acquisition request.
S306, the first electronic device acquires updated script codes from the second electronic device according to the script information.
For example, after the first electronic device receives the script information sent by the second electronic device, the first electronic device may find the updated script code in the second electronic device based on the received script information.
In this embodiment, the first electronic device may acquire the updated script code in the second electronic device based on the script information returned by the second electronic device. Furthermore, the problem that the second electronic device occupies larger operation resources when the second electronic device directly sends updated script codes to the first electronic device can be avoided, so that a user can develop or modify other application pages based on the second electronic device.
In one example, the script information includes: script address and script description information; the script address is an address for storing the updated script code; the script description information includes identification information of the updated script code.
Illustratively, the script address may be a storage location of the updated script code in the second electronic device. The identification information of the updated script code may be a name of the updated script code, for example, may be a module name corresponding to the updated script code when the updated script code is stored in a modularized package.
It can be understood that the script information fed back to the first electronic device by the second electronic device may include the address of the updated script code and the updated script description information, and further, the first electronic device may quickly determine the updated script code that needs to be acquired based on the address of the updated script code and the identification information of the updated script code, so as to improve the updating efficiency of the display interface of the first client corresponding to the first electronic device.
For example, the weback package tool may be used in the second electronic device to package the script code of the page stored in the second electronic device, and store the script code of the page after the package process in the second electronic device. And, the packing tool can also be used for monitoring whether the operation of updating the page script code exists in the second electronic equipment in real time. When the page script code in the second electronic device is updated, generating a first hash value corresponding to the updated page script code, and sending the first hash value to the second electronic device by the second electronic device. When the first electronic device determines that the first hash value is inconsistent with the second hash value stored in advance, the second electronic device sends a script file to the first electronic device after the first electronic device sends a second acquisition request to the second electronic device. And then, the first electronic equipment can acquire updated script codes in the second electronic equipment in a jsonp cross-domain access mode, and the first electronic equipment displays the acquired updated script codes.
S307, the first electronic device updates the current page according to the updated script code.
For example, this step may refer to step S102, which is not described herein.
S308, the first electronic equipment sends a second acquisition request to the second electronic equipment according to pre-stored address information of the second electronic equipment; the second acquisition request is used for indicating to acquire script codes in the second electronic equipment;
for example, in order to display a page corresponding to a script code provided by the second electronic device on a first client corresponding to the first electronic device, in this embodiment, the first electronic device may send, to the second electronic device, a second acquisition request for requesting the script code in the second electronic device through pre-stored address information of the second electronic device.
S309, the first electronic device receives the script code of the page to be displayed sent by the second electronic device, and displays the page to be displayed based on the interface on the first client according to the script code of the page to be displayed.
In an exemplary embodiment, after the first electronic device receives the script code of the page to be displayed sent by the second electronic device, the first electronic device may display the page to be displayed on the interface of the first client corresponding to the first electronic device based on the script code of the page to be displayed.
It can be understood that when a display interface corresponding to a script code provided by the second electronic device needs to be displayed on a first client interface corresponding to the first electronic device, because only the first electronic device corresponding to the first client can acquire the user information of the first client and the application information displayed by the first client, the second electronic device needs to configure the script code in the second electronic device through the user information and the application information issued by the first electronic device, and further obtains the script code of the page to be displayed finally. Therefore, when the display interface corresponding to the code provided by the second electronic device needs to be displayed on the first client interface, at this time, the second electronic device can send the finally determined script code of the page to be displayed to the first electronic device, so that the phenomenon that the first electronic device needs to occupy a certain operation resource to wait for the second electronic device to configure the script code of the interface to be displayed is avoided.
In one example, the second acquisition request includes page information of a current blank page of the first electronic device; the script code of the page to be displayed is determined based on a preset corresponding relation, wherein the preset corresponding relation is used for representing the mapping relation between the page information and the page to be displayed.
In this embodiment, a plurality of blank pages may be set in the first electronic device, where the blank pages have respective page information, and the first electronic device may send page information corresponding to a blank page selected by a user to the second electronic device in response to a trigger of the user on the blank page, and further, the second electronic device may determine, in the second electronic device, a script code corresponding to the page to be displayed based on the page information issued by the first electronic device, the preset page information, and a mapping relationship between the page to be displayed.
For example, the second acquisition request sent by the first electronic device to the second electronic device may include a routing address, a page authority, user information, and application information. The routing address can be used for representing address information corresponding to a blank page triggered by a user in the first electronic device; the application information is used for representing the name, the identifier and the like of the application to which the page displayed by the current first client belongs; the user information is used for representing information such as a user name for logging in the current application; the page permission information is used to characterize the page information permissions that the user accesses for the current user of the login application. When the second electronic device receives the second acquisition request sent by the first electronic device, the second electronic device can determine script codes in the second electronic device corresponding to the routing address according to a preset corresponding relation based on the received routing address. The second electronic device may modify the determined script code based on the page authority, the user information, and the application information in the second acquisition request. For example, the second electronic device may add the user name of the user information in the second obtaining request to the preset position in the determined script band code, and further, after the first electronic device obtains the added script code, the user name may be displayed on the display interface. For another example, the second electronic device may modify the content in the script code of the determined page based on the page permission in the second obtaining request, and further after the first electronic device obtains the modified script code, a display interface corresponding to the current login user permission is displayed on the display interface.
It can be understood that, through the mapping relationship between the page information of the blank page and the page to be displayed, the second electronic device can quickly determine the script code of the page to be displayed, and can also configure the script code of the page to be displayed based on the obtained page information, so as to obtain the script code of the page to be displayed finally, so that the first electronic device can display the page on the first client.
S310, the first electronic equipment responds to a page switching instruction and deletes script codes corresponding to the current page; the page switching instruction is used for indicating to switch from a current page to another page.
For example, a mounting container may be provided in the first electronic device, and when a page corresponding to the script code provided by the second electronic device needs to be displayed, the script code provided by the second electronic device may be stored in the mounting container, so that the first electronic device may display the page corresponding to the script code on the first client based on the script code in the mounting container. That is, the mounting container is script code in the first electronic device for storing a page of a display interface currently displayed on the first client, and the script code is provided for the second electronic device. When the page is required to be switched, the first electronic device can delete the script code of the page stored in the mounting container, so that the script code of the page to be displayed provided by the second electronic device can be mounted and stored in the mounting container provided by the first electronic device, and the switching of the page is realized.
In one example, step S310 may be implemented by:
the first electronic device responds to the page switching instruction and sends a deleting request to the second electronic device, wherein the deleting request is used for indicating the second electronic device to run an uninstaller, and the uninstaller is used for deleting script codes corresponding to the current page stored by the first electronic device.
In an exemplary embodiment, when a user needs to switch a page displayed on an interface of a first client, the first electronic device may send a deletion request to the second electronic device in response to a received page switching instruction, and after the second electronic device receives the deletion request, the second electronic device may delete a script code corresponding to a current page in the first electronic device based on a preset uninstallation program, so that the first client corresponding to the first electronic device may display other pages subsequently.
It can be understood that the script code corresponding to the current page stored by the first electronic device is deleted by the second electronic device, so that the switching of the display interface of the first client is realized, so that the second electronic device can know the message of the first client that the current page needs to be switched. The phenomenon that page display errors are caused by the fact that page codes in a mounting container are not completely deleted when the second electronic device mounts page script codes into the first electronic device is avoided.
In this embodiment, if the script code corresponding to the current page is updated in the second electronic device, at this time, the first electronic device may acquire the updated script code from the second electronic device based on the script information returned by the second electronic device. Furthermore, the problem that the second electronic device occupies larger operation resources when the second electronic device directly sends updated script codes to the first electronic device can be avoided, so that a user can develop or modify other application pages based on the second electronic device.
In one example, fig. 4 is a signaling diagram according to a second embodiment of the present disclosure. As shown in fig. 4, the method provided in this embodiment includes the following steps: s401, the first electronic device responds to a connection instruction input by a user, and establishes connection with the second electronic device according to a communication script indicated by the connection instruction. S402, a second electronic device sends a first hash value to a first electronic device; s403, if the first electronic device determines that the first hash value is different from the pre-stored second hash value, determining that the current page needs to be updated; s404, the first electronic device sends a first acquisition request to the second electronic device; s405, the second electronic device sends script information to the first electronic device; s406, the first electronic device acquires updated script codes from the second electronic device according to the script information; s407, the first electronic equipment updates the current page according to the updated script code; s408, the first electronic device sends a second acquisition request to the second electronic device according to the pre-stored address information of the second electronic device; s409, script codes of pages to be displayed, which are sent to the first electronic equipment by the second electronic equipment; s410, the first electronic device displays the page to be displayed based on the interface on the first client according to the script code of the page to be displayed; s411, the first electronic device responds to the page switching instruction and deletes the script code corresponding to the current page. Illustratively, the principles of the steps in this example may be referred to the description of the embodiment provided in fig. 3, and will not be repeated herein.
Fig. 5 is a schematic diagram according to a third embodiment of the present disclosure, and as shown in fig. 5, a page fusion method based on different code platforms provided in this embodiment includes:
s501, if the first electronic device determines that the second electronic device acquires the communication script, acquiring the communication script in the second electronic device; the communication script is used for establishing connection between the first electronic device and the second electronic device.
The execution body of the present embodiment may be, for example, a first electronic device, where the first electronic device may be a terminal device, or a server, or other apparatus or device that may execute the method of the present embodiment.
In this embodiment, when the first electronic device and the second electronic device establish a communication connection, the user may input a communication script for establishing the communication connection into the second electronic device. After the first electronic device determines that the second electronic device obtains the communication script, the second electronic device can establish communication connection with the second electronic device by obtaining the communication script in the second electronic device.
In one example, when an application corresponding to a page in a first electronic device is started, a communication script in a second electronic device may be obtained through a pre-stored address of a script code in the second electronic device.
In one example, an application corresponding to a page developed in a first electronic device may be invoked by an application in a second electronic device. For example, when an application in the second electronic device is started, an open file of the application to be called in the first electronic device may be obtained through preset address information (for example, the address information may include an internet protocol address, a port address, application information to be called, etc.) of the first electronic device, and then the second electronic device may open the application to be called in the second electronic device based on the open file of the application to be called in the first electronic device. In addition, address information corresponding to the application in the second electronic device can be written in an opening file of the application to be called in the first electronic device, and furthermore, in the first electronic device, the application to be called can also call the application in the second electronic device in the process of initializing and starting so as to establish an association relationship between the first electronic device and the application in the second electronic device.
S502, the first electronic device establishes connection with the second electronic device according to the communication script.
The first electronic device may, for example, after acquiring the communication script in the second electronic device, establish a communication connection with the second electronic device through the communication script.
In this embodiment, since the code development platform corresponding to the first electronic device is a low-code development platform, the user cannot inject the code developed by the user into the low-code development platform. Therefore, the user can inject the communication script developed by the user into the second electronic device, and the first electronic device can realize communication by acquiring the communication script in the second electronic device, so that the first electronic device can acquire the information when the page in the second electronic device is updated.
S503, if the first electronic device determines that the current page needs to be updated, acquiring updated script codes corresponding to the current page in the second electronic device; the current page is a page on an interface displayed by a first client corresponding to the first electronic device, and the current page is a page obtained based on script codes provided by the second electronic device; the first electronic device and the second electronic device are devices running different script codes.
For example, step S503 may refer to step S101, and the specific principle is not described in detail.
S504, the first electronic device updates the current page according to the updated script code.
For example, step S504 may refer to step S102, and the specific principles are not repeated.
S505, the first electronic equipment responds to a trigger instruction of a user, and access information corresponding to a component indicated by the trigger instruction is obtained; the triggering instruction is used for indicating to trigger the component on the current page; accessing functional information of the information characterization component;
in this embodiment, the interface displayed by the first client further includes at least one component, and when the user needs to access the access information corresponding to the component provided on the page, the first electronic device responds to the trigger instruction of the user to obtain the access information corresponding to the component corresponding to the trigger instruction. The function information of the component may be a function of displaying a corresponding chart or text, and the like, and is not particularly limited herein. For example, when a drop-down selection frame is provided on the user electronic page, the first electronic device may determine a drop-down option to be displayed in the drop-down selection frame by acquiring access information corresponding to the drop-down selection frame.
In one example, step S505 may be implemented by the following manner;
the first implementation of step S505: responding to a triggering instruction of a user, and if the component indicated by the triggering instruction is determined to be a component provided by first electronic equipment, acquiring preset first white list information, wherein the first white list comprises components accessible by the user; and if the first white list information comprises the component indicated by the trigger instruction, acquiring access information corresponding to the component indicated by the trigger instruction from the first electronic equipment.
Illustratively, the first electronic device has pre-stored therein first whitelist information comprising components accessible to the user. When the first electronic device receives a triggering instruction of a user, if the first electronic device determines that a component to be triggered in the received triggering instruction is a component provided by the first electronic device, at this time, the first electronic device can judge whether the current user has permission to access the component triggered by the first electronic device through preset first white list information, and if the first white list includes the component, the first electronic device can acquire access information corresponding to the component in the first electronic device.
It can be understood that by presetting the first white list information in the first electronic device, whether the user has the right to access the triggered component is judged, so that the safety of the application is improved.
The second implementation of step S505: responding to a triggering instruction of a user, and if the component indicated by the triggering instruction is determined to be a component provided by second electronic equipment, acquiring preset second white list information, wherein the second white list comprises components accessible by the user; and if the second white list information comprises the component indicated by the trigger instruction, acquiring access information corresponding to the component indicated by the trigger instruction from the second electronic equipment.
The second white list information is also preset in the first electronic device. When the component indicated by the user triggering instruction is a component provided by the second electronic device, at this time, the first electronic device may determine whether the second whitelist information includes the component, and if so, the first electronic device may go to the second electronic device to obtain access information corresponding to the component, so as to enable the access information to be displayed on a display interface of the first client corresponding to the first electronic device. When the second electronic device receives a third acquisition request, sent by the first electronic device, for acquiring the access information of the component, the second electronic device searches the access information corresponding to the component corresponding to the third acquisition request, and then sends the determined access information to the first electronic device.
In one example, an interceptor, a requestor, a server, and a proxy module are included in a first electronic device. The interceptor is used for responding to a triggering instruction of a user, and if the triggering instruction indicates that the component is provided by the second electronic equipment, the triggering instruction is sent to the proxy module through the server and is compared with the second white list information stored in the proxy module in advance. And then, the agent module returns the comparison result to the interceptor through the server. If the interceptor determines that the comparison result is passed, the trigger instruction is sent to the requester so that the requester processes the trigger instruction, the processed trigger instruction is sent to the proxy module through the server, and then the proxy module accesses the access information of the component corresponding to the trigger instruction in the second electronic device. After the agent module obtains the access information of the component in the second electronic device, the first electronic device displays the access information based on the obtained access information.
It can be understood that by presetting the second white list information in the first electronic device, whether the user has the right to access the component provided by the second electronic device triggered by the user is judged, so that the safety of the application is improved.
S506, the first electronic device displays the access information on the current page.
For example, after the first electronic device obtains the access information, the access information is displayed on the current page, so that the user obtains the function information corresponding to the component.
In this embodiment, the second whitelist information is preset in the first electronic device, when the user triggers the component provided by the second electronic device in the display interface of the first client, the first electronic device may perform permission judgment through the preset second whitelist information, and after the permission judgment is passed, the first electronic device obtains the access information corresponding to the component in the second electronic device, so as to further achieve the integration of pages of different code platforms, and improve the user experience.
Fig. 6 is a schematic diagram according to a fourth embodiment of the present disclosure, and as shown in fig. 6, a page fusion method based on different code platforms provided in this embodiment includes:
S601, a second electronic device receives a first acquisition request sent by a first electronic device; the first acquisition request is used for indicating to acquire updated script codes of the current page, and the first acquisition request is sent when the current page is determined to need updating; the current page is a page on an interface displayed by a first client corresponding to the first electronic device, and the current page is a page obtained based on script codes provided by the second electronic device; the first electronic device and the second electronic device are devices running different script codes.
S602, the second electronic equipment feeds back script information to the first electronic equipment according to the first acquisition request; the script information is used for indicating an address for storing the updated script code; the script information is used for acquiring updated script codes; the updated script code is used to update the current page.
In one example, the first acquisition request is issued based on address information of the second electronic device.
In one example, the script information includes: script address and script description information, wherein the script address is an address for storing updated script codes; the script description information includes identification information of the updated script code.
In one example, the method provided in this embodiment further includes:
if the second electronic device determines that the script code corresponding to the current page is updated, generating a first hash value; the first hash value is used for indicating updated script codes; the second electronic device sends the first hash value to the first electronic device; the first hash value is used for determining that the current page needs to be updated if the first hash value is different from a pre-stored second hash value; the pre-stored second hash value is used to indicate the pre-update script code of the current page.
In one example, the method provided in this embodiment further includes:
the second electronic equipment receives a second acquisition request sent by the first electronic equipment; the second acquisition request is used for indicating to acquire script codes in the second electronic equipment.
The second electronic device determines the script code requested by the second acquisition request and sends the determined script code to the first electronic device; the script code requested by the second acquisition request is used for generating and displaying an interface to be displayed.
In one example, the second acquisition request includes page information of a current blank page of the first electronic device; the second electronic device determining script code requested by the second acquisition request, including: the second electronic equipment determines script codes of pages to be displayed corresponding to the page information according to preset corresponding relations; the preset corresponding relation is used for representing the mapping relation between the page information and the page to be displayed.
In one example, the method provided in this embodiment further includes:
the second electronic equipment receives a deleting request sent by the first electronic equipment; the deleting request is used for indicating to run the uninstaller, the deleting request is generated based on a page switching instruction, and the page switching instruction is used for indicating to switch from a current page to another page; and the second electronic equipment runs the uninstaller program, and deletes the script code corresponding to the current page stored in the first electronic equipment based on the uninstaller program.
In one example, the current page includes at least one component, the component having access information corresponding thereto, the access information characterizing functional information of the component.
In one example, the method provided in this embodiment further includes:
the second electronic equipment receives a third acquisition request sent by the first electronic equipment; the third acquisition request is used for indicating to acquire the access information of the triggered component on the current page; the third acquisition request is generated when the triggered component is determined to exist in the second white list information; the second whitelist includes components accessible to the user; the second electronic device determines the access information requested by the third acquisition request and transmits the determined access information to the first electronic device.
In one example, the method provided in this embodiment further includes:
the second electronic equipment acquires a communication script input by a user and stores the communication script; the communication script is used for establishing connection between the first electronic device and the second electronic device.
The execution body of the present embodiment may be, for example, a second electronic device, where the second electronic device may be a terminal device, or a server, or other apparatus or device that may execute the method of the present embodiment.
The method of the embodiment may execute the technical scheme in the method, and the specific implementation process and the technical principle are the same and are not repeated here.
Fig. 7 is a schematic diagram according to a fifth embodiment of the present disclosure. As shown in fig. 7, the page fusion apparatus 700 based on different code platforms provided in this embodiment is applied to a first electronic device, where the page fusion apparatus 700 includes:
a first determining unit 701, configured to determine that the current page needs to be updated.
A first obtaining unit 702, configured to obtain updated script codes corresponding to a current page in the second electronic device; the current page is a page on an interface displayed by a first client corresponding to the first electronic device, and the current page is a page obtained based on script codes provided by the second electronic device; the first electronic device and the second electronic device are devices running different script codes.
An updating unit 703, configured to update the current page according to the updated script code.
The device of the embodiment may execute the technical scheme in the above method, and the specific implementation process and the technical principle are the same and are not described herein again.
Fig. 8 is a schematic diagram according to a sixth embodiment of the present disclosure. As shown in fig. 8, the page fusion apparatus 800 provided in this embodiment based on different code platforms is applied to a first electronic device, where the page fusion apparatus 800 includes:
a first determining unit 801, configured to determine that the current page needs to be updated.
A first obtaining unit 802, configured to obtain updated script codes corresponding to a current page in the second electronic device; the current page is a page on an interface displayed by a first client corresponding to the first electronic device, and the current page is a page obtained based on script codes provided by the second electronic device; the first electronic device and the second electronic device are devices running different script codes.
And an updating unit 803 for updating the current page according to the updated script code.
In one example, the first acquisition unit 802 includes:
the sending module 8021 is configured to send a first acquisition request to the second electronic device, where the first acquisition request is used to instruct to acquire the updated script code.
The first receiving module 8022 is configured to receive script information sent by the second electronic device, where the script information is used to indicate an address for storing the updated script code, and obtain the updated script code from the second electronic device according to the script information.
In one example, the sending module 8021 is specifically configured to:
and sending a first acquisition request to the second electronic equipment based on the pre-stored address information of the second electronic equipment.
In one example, the script information includes: script address and script description information; the script address is an address for storing the updated script code; the script description information includes identification information of the updated script code.
In one example, the first determining unit 801 includes:
the second receiving module 8011 is configured to receive a first hash value sent by the second electronic device, where the first hash value is used to indicate the updated script code.
A first determining module 8012, configured to determine that the current page needs to be updated if it is determined that the first hash value is different from the pre-stored second hash value; the pre-stored second hash value is used for indicating the script code before updating of the current page.
In one example, the apparatus provided in this embodiment further includes:
A first sending unit 804, configured to send a second acquisition request to a second electronic device according to pre-stored address information of the second electronic device; the second acquisition request is used for indicating to acquire script codes in the second electronic equipment.
The first receiving unit 805 is configured to receive a script code of a page to be displayed sent by the second electronic device.
The first display unit 806 is configured to display the page to be displayed based on the interface on the first client according to the script code of the page to be displayed.
In one example, the second acquisition request includes page information of a current blank page of the first electronic device; the script code of the page to be displayed is determined based on a preset corresponding relation, wherein the preset corresponding relation is used for representing the mapping relation between the page information and the page to be displayed.
In one example, the apparatus provided in this embodiment further includes:
a deleting unit 807 configured to delete a script code corresponding to a current page in response to a page switch instruction; the page switching instruction is used for indicating to switch from a current page to another page.
In one example, the deleting unit 807 is specifically configured to send, in response to a page switch instruction, a deletion request to the second electronic device, where the deletion request is used to instruct to run an uninstaller, and the uninstaller is used to delete script code corresponding to a current page stored in the first electronic device.
In one example, the apparatus provided in this embodiment further includes:
a second obtaining unit 808, configured to obtain, in response to a trigger instruction of a user, access information corresponding to a component indicated by the trigger instruction; the triggering instruction is used for indicating to trigger the component on the current page; the access information characterizes functional information of the component.
And a second display unit 809 for displaying the access information on the current page.
In one example, the second acquisition unit 808 includes:
the first obtaining module 8081 is configured to, in response to a trigger instruction of a user, obtain preset first whitelist information if it is determined that a component indicated by the trigger instruction is a component provided by the first electronic device, where the first whitelist includes components accessible to the user.
The second obtaining module 8082 is configured to obtain, if it is determined that the first whitelist information includes the component indicated by the trigger instruction, access information corresponding to the component indicated by the trigger instruction from the first electronic device.
In one example, the second acquisition unit 808 includes:
the third obtaining module 8083 is configured to, in response to a trigger instruction of a user, obtain preset second whitelist information if it is determined that a component indicated by the trigger instruction is a component provided by the second electronic device, where the second whitelist includes components accessible to the user.
The fourth obtaining module 8084 is configured to obtain, if it is determined that the second whitelist information includes the component indicated by the trigger instruction, access information corresponding to the component indicated by the trigger instruction from the second electronic device.
In one example, the apparatus provided in this embodiment further includes:
the third acquisition unit is used for acquiring the communication script in the second electronic equipment if the second electronic equipment is determined to acquire the communication script; the communication script is used for establishing connection between the first electronic device and the second electronic device.
And establishing connection with the second electronic equipment according to the communication script.
In one example, the apparatus provided in this embodiment further includes:
the connection unit is used for responding to a connection instruction input by a user and establishing connection with the second electronic equipment according to a communication script indicated by the connection instruction; the connection instruction is used for indicating a communication script, and the communication script is used for establishing connection between the first electronic equipment and the second electronic equipment.
Fig. 9 is a schematic diagram according to a seventh embodiment of the present disclosure. As shown in fig. 9, the page fusion apparatus 900 provided in this embodiment based on different code platforms, where the page fusion apparatus 900 is applied to a second electronic device, the page fusion apparatus 900 includes:
A second receiving unit 901, configured to receive a first acquisition request sent by a first electronic device; the first acquisition request is used for indicating to acquire updated script codes of the current page, and the first acquisition request is sent when the current page is determined to need updating; the current page is a page on an interface displayed by a first client corresponding to the first electronic device, and the current page is a page obtained based on script codes provided by the second electronic device; the first electronic device and the second electronic device are devices running different script codes.
A feedback unit 902, configured to feed back script information to the first electronic device according to the first acquisition request; the script information is used for indicating an address for storing the updated script code; the script information is used for acquiring updated script codes; the updated script code is used to update the current page.
The device of the embodiment may execute the technical scheme in the above method, and the specific implementation process and the technical principle are the same and are not described herein again.
Fig. 10 is a schematic diagram according to an eighth embodiment of the present disclosure. As shown in fig. 10, the page fusion apparatus 1000 based on different code platforms provided in this embodiment, where the page fusion apparatus 1000 is applied to a second electronic device, the page fusion apparatus 1000 includes:
A second receiving unit 1001, configured to receive a first acquisition request sent by a first electronic device; the first acquisition request is used for indicating to acquire updated script codes of the current page, and the first acquisition request is sent when the current page is determined to need updating; the current page is a page on an interface displayed by a first client corresponding to the first electronic device, and the current page is a page obtained based on script codes provided by the second electronic device; the first electronic device and the second electronic device are devices running different script codes;
a feedback unit 1002, configured to feed back script information to the first electronic device according to the first acquisition request; the script information is used for indicating an address for storing the updated script code; the script information is used for acquiring updated script codes; the updated script code is used to update the current page.
In one example, the first acquisition request is issued based on address information of the second electronic device.
In one example, the script information includes: script address and script description information; the script address is an address for storing the updated script code; the script description information includes identification information of the updated script code.
In one example, the apparatus provided in this embodiment further includes:
a generating unit 1003, configured to generate a first hash value if it is determined that the script code corresponding to the current page is updated; the first hash value is used for indicating updated script codes.
A second sending unit 1004, configured to send the first hash value to the first electronic device; the first hash value is used for determining that the current page needs to be updated if the first hash value is different from a pre-stored second hash value; the pre-stored second hash value is used to indicate the pre-update script code of the current page.
In one example, the apparatus provided in this embodiment further includes:
a third receiving unit 1005, configured to receive a second acquisition request sent by the first electronic device; the second acquisition request is used for indicating to acquire script codes in the second electronic equipment.
A second determining unit 1006, configured to determine the script code requested by the second acquisition request.
A third transmitting unit 1007 is configured to transmit the determined script code to the first electronic device. The script code requested by the second acquisition request is used for generating and displaying an interface to be displayed.
In one example, the second acquisition request includes page information of a current blank page of the first electronic device; the second determining unit 1006 is specifically configured to:
Determining script codes of pages to be displayed corresponding to the page information according to preset corresponding relations; the preset corresponding relation is used for representing the mapping relation between the page information and the page to be displayed.
In one example, the apparatus provided in this embodiment further includes:
a fourth receiving unit 1008, configured to receive a deletion request sent by the first electronic device; the deleting request is used for indicating to run the uninstaller, the deleting request is generated based on a page switching instruction, and the page switching instruction is used for indicating to switch from a current page to another page.
The running unit 1009 is configured to run an uninstaller, and delete script codes corresponding to a current page stored in the first electronic device based on the uninstaller.
In one example, the current page includes at least one component, the component having access information corresponding thereto, the access information characterizing functional information of the component.
In one example, the apparatus provided in this embodiment further includes:
a fifth receiving unit 1010, configured to receive a third acquisition request sent by the first electronic device; the third acquisition request is used for indicating to acquire the access information of the triggered component on the current page. The third acquisition request is generated when the triggered component is determined to exist in the second white list information; the second whitelist includes components accessible to the user.
A third determination unit 1011 for determining the access information requested by the third acquisition request.
A fourth transmitting unit 1012 is configured to transmit the determined access information to the first electronic device.
In one example, the apparatus provided in this embodiment further includes:
a fourth acquisition unit 1013 for acquiring a communication script input by a user and storing the communication script; the communication script is used for establishing connection between the first electronic device and the second electronic device.
The device of the embodiment may execute the technical scheme in the above method, and the specific implementation process and the technical principle are the same and are not described herein again.
Fig. 11 is a schematic diagram according to a ninth embodiment of the present disclosure, as shown in fig. 11, an electronic device 1100 in the present disclosure may include: a processor 1101 and a memory 1102.
A memory 1102 for storing a program; memory 1102, which may include volatile memory (English: volatile memory), such as random-access memory (RAM), such as static random-access memory (SRAM), double data rate synchronous dynamic random-access memory (Double Data Rate Synchronous Dynamic Random Access Memory, DDR SDRAM), and the like; the memory may also include a non-volatile memory (English) such as a flash memory (English). The memory 1102 is used to store computer programs (e.g., application programs, functional modules, etc. that implement the methods described above), computer instructions, etc., which may be stored in one or more of the memories 1102 in a partitioned manner. And the above-described computer programs, computer instructions, data, etc. may be invoked by the processor 1101.
The computer programs, computer instructions, etc., described above may be stored in one or more of the memories 1102 in partitions. And the computer programs, computer instructions, etc. described above may be invoked by the processor 1101.
A processor 1101 for executing a computer program stored in the memory 1102 to implement the steps of the method according to the above embodiment.
Reference may be made in particular to the description of the embodiments of the method described above.
The processor 1101 and the memory 1102 may be separate structures or may be integrated structures that are integrated together. When the processor 1101 and the memory 1102 are separate structures, the memory 1102 and the processor 1101 may be coupled by a bus 1103.
The electronic device in this embodiment may execute the technical scheme in the above method, and the specific implementation process and the technical principle are the same, which are not described herein again. It should be noted that, the schematic diagram of the electronic device shown in fig. 11 may be the first electronic device in the above embodiment or the second electronic device in the above embodiment.
According to embodiments of the present disclosure, the present disclosure also provides an electronic device, a readable storage medium and a computer program product.
According to an embodiment of the present disclosure, the present disclosure also provides a computer program product comprising: a computer program stored in a readable storage medium, from which at least one processor of an electronic device can read, the at least one processor executing the computer program causing the electronic device to perform the solution provided by any one of the embodiments described above.
Fig. 12 shows a schematic block diagram of an example electronic device 1200 that can be used to implement embodiments of the present disclosure. Electronic devices are intended to represent various forms of digital computers, such as laptops, desktops, workstations, personal digital assistants, servers, blade servers, mainframes, and other appropriate computers. The electronic device may also represent various forms of mobile devices, such as personal digital processing, cellular telephones, smartphones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions, are meant to be exemplary only, and are not meant to limit implementations of the disclosure described and/or claimed herein.
As shown in fig. 12, the apparatus 1200 includes a computing unit 1201, which may perform various appropriate actions and processes according to a computer program stored in a Read Only Memory (ROM) 1202 or a computer program loaded from a storage unit 1208 into a Random Access Memory (RAM) 1203. In the RAM 1203, various programs and data required for the operation of the device 1200 may also be stored. The computing unit 1201, the ROM 1202, and the RAM 1203 are connected to each other via a bus 1204. An input/output (I/O) interface 1205 is also connected to the bus 1204.
Various components in device 1200 are connected to I/O interface 1205, including: an input unit 1206 such as a keyboard, mouse, etc.; an output unit 1207 such as various types of displays, speakers, and the like; a storage unit 1208 such as a magnetic disk, an optical disk, or the like; and a communication unit 1209, such as a network card, modem, wireless communication transceiver, etc. The communication unit 1209 allows the device 1200 to exchange information/data with other devices via a computer network, such as the internet, and/or various telecommunications networks.
The computing unit 1201 may be a variety of general and/or special purpose processing components having processing and computing capabilities. Some examples of computing unit 1201 include, but are not limited to, a Central Processing Unit (CPU), a Graphics Processing Unit (GPU), various specialized Artificial Intelligence (AI) computing chips, various computing units running machine learning model algorithms, digital Signal Processors (DSPs), and any suitable processor, controller, microcontroller, etc. The computing unit 1201 performs the various methods and processes described above, such as page fusion methods based on different code platforms. For example, in some embodiments, the page fusion method based on different code platforms may be implemented as a computer software program tangibly embodied on a machine-readable medium, such as storage unit 1208. In some embodiments, part or all of the computer program may be loaded and/or installed onto device 1200 via ROM 1202 and/or communication unit 1209. When the computer program is loaded into the RAM 1203 and executed by the computing unit 1201, one or more steps of the page fusion method of the method described above based on different code platforms may be performed. Alternatively, in other embodiments, the computing unit 1201 may be configured by any other suitable means (e.g., by means of firmware) to perform a method based on a page fusion method of a different code platform.
Note that, the schematic diagram of the electronic device shown in fig. 12 may be the first electronic device in the above embodiment or the second electronic device in the above embodiment.
Various implementations of the systems and techniques described here above may be implemented in digital electronic circuitry, integrated circuit systems, field Programmable Gate Arrays (FPGAs), application Specific Integrated Circuits (ASICs), application Specific Standard Products (ASSPs), systems On Chip (SOCs), complex Programmable Logic Devices (CPLDs), computer hardware, firmware, software, and/or combinations thereof. These various embodiments may include: implemented in one or more computer programs, the one or more computer programs may be executed and/or interpreted on a programmable system including at least one programmable processor, which may be a special purpose or general-purpose programmable processor, that may receive data and instructions from, and transmit data and instructions to, a storage system, at least one input device, and at least one output device.
Program code for carrying out methods of the present disclosure may be written in any combination of one or more programming languages. These program code may be provided to a processor or controller of a general purpose computer, special purpose computer, or other programmable data processing apparatus such that the program code, when executed by the processor or controller, causes the functions/operations specified in the flowchart and/or block diagram to be implemented. The program code may execute entirely on the machine, partly on the machine, as a stand-alone software package, partly on the machine and partly on a remote machine or entirely on the remote machine or server.
In the context of this disclosure, a machine-readable medium may be a tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. The machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. The machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. More specific examples of a machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
To provide for interaction with a user, the systems and techniques described here can be implemented on a computer having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to a user; and a keyboard and pointing device (e.g., a mouse or trackball) by which a user can provide input to the computer. Other kinds of devices may also be used to provide for interaction with a user; for example, feedback provided to the user may be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form, including acoustic input, speech input, or tactile input.
The systems and techniques described here can be implemented in a computing system that includes a background component (e.g., as a data server), or that includes a middleware component (e.g., an application server), or that includes a front-end component (e.g., a user computer having a graphical user interface or a web browser through which a user can interact with an implementation of the systems and techniques described here), or any combination of such background, middleware, or front-end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: local Area Networks (LANs), wide Area Networks (WANs), and the internet.
The computer system may include a client and a server. The client and server are typically remote from each other and typically interact through a communication network. The relationship of client and server arises by virtue of computer programs running on the respective computers and having a client-server relationship to each other. The server can be a cloud server, also called a cloud computing server or a cloud host, and is a host product in a cloud computing service system, so that the defects of high management difficulty and weak service expansibility in the traditional physical hosts and VPS service ("Virtual Private Server" or simply "VPS") are overcome. The server may also be a server of a distributed system or a server that incorporates a blockchain.
It should be appreciated that various forms of the flows shown above may be used to reorder, add, or delete steps. For example, the steps recited in the present disclosure may be performed in parallel or sequentially or in a different order, provided that the desired results of the technical solutions of the present disclosure are achieved, and are not limited herein.
The above detailed description should not be taken as limiting the scope of the present disclosure. It will be apparent to those skilled in the art that various modifications, combinations, sub-combinations and alternatives are possible, depending on design requirements and other factors. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present disclosure are intended to be included within the scope of the present disclosure.

Claims (23)

1. A method of page fusion based on different code platforms, the method being applied to a first electronic device, the method comprising:
receiving a first hash value sent by second electronic equipment, wherein the first hash value is used for indicating updated script codes;
if the first hash value is different from a pre-stored second hash value, determining that the current page needs to be updated, wherein the pre-stored second hash value is used for indicating script codes before updating of the current page;
Acquiring updated script codes corresponding to the current page in the second electronic equipment; the current page is a page on an interface displayed by a first client corresponding to the first electronic device, and the current page is a page obtained based on script codes provided by the second electronic device; the first electronic device and the second electronic device are devices running different script codes;
updating the current page according to the updated script code;
further comprises:
responding to a page switching instruction, and sending a deleting request to the second electronic device, wherein the deleting request is used for indicating to run an uninstaller, and the uninstaller is used for deleting script codes corresponding to the current page stored by the first electronic device; the page switching instruction is used for indicating to switch from a current page to another page.
2. The method of claim 1, wherein the obtaining updated script code in the second electronic device corresponding to the current page comprises:
sending a first acquisition request to the second electronic device, wherein the first acquisition request is used for indicating to acquire the updated script code;
And receiving script information sent by the second electronic equipment, wherein the script information is used for indicating an address for storing the updated script code, and acquiring the updated script code from the second electronic equipment according to the script information.
3. The method of claim 2, wherein sending a first acquisition request to the second electronic device comprises:
and sending the first acquisition request to the second electronic equipment based on pre-stored address information of the second electronic equipment.
4. A method according to claim 2 or 3, the script information comprising: script address and script description information;
wherein, the script address is an address for storing the updated script code; the script description information comprises identification information of the updated script code.
5. A method according to any one of claims 1-3, further comprising:
sending a second acquisition request to the second electronic equipment according to pre-stored address information of the second electronic equipment; the second acquisition request is used for indicating to acquire script codes in the second electronic equipment;
and receiving the script code of the page to be displayed, which is sent by the second electronic equipment, and displaying the page to be displayed based on the interface on the first client according to the script code of the page to be displayed.
6. The method of claim 5, wherein the second acquisition request includes page information of a current blank page of the first electronic device;
the script code of the page to be displayed is determined based on a preset corresponding relation, wherein the preset corresponding relation is used for representing the mapping relation between the page information and the page to be displayed.
7. The method of any of claims 1-3, 6, further comprising:
responding to a trigger instruction of a user, and acquiring access information corresponding to a component indicated by the trigger instruction; the triggering instruction is used for indicating to trigger the component on the current page; the access information characterizes the functional information of the component;
and displaying the access information on the current page.
8. The method of claim 7, wherein the responding to the trigger instruction of the user, obtaining the access information corresponding to the component indicated by the trigger instruction, comprises:
responding to a trigger instruction of a user, and if the component indicated by the trigger instruction is determined to be the component provided by the first electronic equipment, acquiring preset first white list information, wherein the first white list comprises components accessible by the user;
And if the first white list information comprises the component indicated by the trigger instruction, acquiring access information corresponding to the component indicated by the trigger instruction from the first electronic equipment.
9. The method of claim 8, wherein the responding to the trigger instruction of the user, obtaining the access information corresponding to the component indicated by the trigger instruction, comprises:
responding to a triggering instruction of a user, and if the component indicated by the triggering instruction is determined to be a component provided by the second electronic equipment, acquiring preset second white list information, wherein the second white list comprises components accessible by the user;
and if the second white list information comprises the component indicated by the trigger instruction, acquiring access information corresponding to the component indicated by the trigger instruction from the second electronic equipment.
10. The method of any of claims 1-3, 6, 8-9, further comprising:
if the second electronic equipment is determined to acquire the communication script, acquiring the communication script in the second electronic equipment; the communication script is used for establishing connection between the first electronic equipment and the second electronic equipment;
And establishing connection with the second electronic equipment according to the communication script.
11. The method of any of claims 1-3, 6, 8-9, further comprising:
responding to a connection instruction input by a user, and establishing connection with the second electronic equipment according to a communication script indicated by the connection instruction; the connection instruction is used for indicating a communication script, and the communication script is used for establishing connection between the first electronic equipment and the second electronic equipment.
12. A method of page fusion based on different code platforms, the method being applied to a second electronic device, the method comprising:
if the script code corresponding to the current page is updated, generating a first hash value; the first hash value is used for indicating updated script codes of the current page;
transmitting the first hash value to a first electronic device; the first hash value is used for determining that the current page needs to be updated if the first hash value is different from a pre-stored second hash value; the pre-stored second hash value is used for indicating the script code before updating of the current page;
receiving a first acquisition request sent by the first electronic equipment; the first acquisition request is used for indicating to acquire the updated script code, and the first acquisition request is sent when the current page is determined to need updating; the current page is a page on an interface displayed by a first client corresponding to the first electronic device, and the current page is a page obtained based on script codes provided by the second electronic device; the first electronic device and the second electronic device are devices running different script codes;
According to the first acquisition request, script information is fed back to the first electronic equipment; wherein the script information is used for indicating an address for storing the updated script code; the script information is used for acquiring the updated script code; the updated script code is used for updating the current page;
further comprises:
receiving a deletion request sent by the first electronic equipment; the deleting request is used for indicating to run an uninstaller, the deleting request is generated based on a page switching instruction, and the page switching instruction is used for indicating to switch from a current page to another page;
and running the uninstaller program, and deleting script codes corresponding to the current page stored by the first electronic device based on the uninstaller program.
13. The method of claim 12, wherein the first acquisition request is issued based on address information of the second electronic device.
14. The method of claim 12 or 13, the script information comprising: script address and script description information;
wherein, the script address is an address for storing the updated script code; the script description information comprises identification information of the updated script code.
15. The method of claim 12 or 13, further comprising:
receiving a second acquisition request sent by the first electronic equipment; the second acquisition request is used for indicating to acquire script codes in the second electronic equipment;
determining a script code requested by the second acquisition request, and transmitting the determined script code to the first electronic device; and the script code requested by the second acquisition request is used for generating and displaying an interface to be displayed.
16. The method of claim 15, wherein the second acquisition request includes page information of a current blank page of the first electronic device; determining script code requested by the second acquisition request, comprising:
determining script codes of pages to be displayed corresponding to the page information according to preset corresponding relations; the preset corresponding relation is used for representing the mapping relation between the page information and the page to be displayed.
17. The method of any of claims 12, 13, 16, wherein the current page includes at least one component thereon, the component corresponding to access information, the access information characterizing functional information of the component.
18. The method of claim 17, further comprising:
receiving a third acquisition request sent by the first electronic equipment; the third acquisition request is used for indicating to acquire access information of the triggered component on the current page; the third acquisition request is generated when the triggered component is determined to exist in second white list information; the second whitelist includes components accessible to the user;
and determining the access information requested by the third acquisition request, and sending the determined access information to the first electronic equipment.
19. The method of any of claims 12, 13, 16, 18, further comprising:
acquiring a communication script input by a user and storing the communication script; the communication script is used for establishing connection between the first electronic equipment and the second electronic equipment.
20. A page fusion apparatus based on different code platforms, the apparatus being applied to a first electronic device, the apparatus comprising:
the first determining unit is used for receiving a first hash value sent by the second electronic equipment, wherein the first hash value is used for indicating updated script codes; if the first hash value is different from the pre-stored second hash value, determining that the current page needs to be updated; the pre-stored second hash value is used for indicating the script code before updating of the current page; a first obtaining unit, configured to obtain updated script codes corresponding to the current page in the second electronic device; the current page is a page on an interface displayed by a first client corresponding to the first electronic device, and the current page is a page obtained based on script codes provided by the second electronic device; the first electronic device and the second electronic device are devices running different script codes;
The updating unit is used for updating the current page according to the updated script code;
a deleting unit, configured to respond to a page switching instruction, and send a deletion request to the second electronic device, where the deletion request is used to instruct to run an uninstaller, and the uninstaller is used to delete a script code corresponding to the current page stored in the first electronic device; the page switching instruction is used for indicating to switch from a current page to another page.
21. A page fusion apparatus based on a different code platform, the apparatus being applied to a second electronic device, the apparatus comprising:
the second receiving unit is used for receiving a first acquisition request sent by the first electronic equipment; the first acquisition request is used for indicating to acquire updated script codes of a current page, and the first acquisition request is sent when the current page is determined to need updating; the current page is a page on an interface displayed by a first client corresponding to the first electronic device, and the current page is a page obtained based on script codes provided by the second electronic device; the first electronic device and the second electronic device are devices running different script codes;
The feedback unit is used for feeding back script information to the first electronic equipment according to the first acquisition request; wherein the script information is used for indicating an address for storing the updated script code; the script information is used for acquiring the updated script code; the updated script code is used for updating the current page;
a generation unit, configured to generate a first hash value if it is determined that the script code corresponding to the current page is updated; wherein the first hash value is used to indicate the updated script code;
a second sending unit, configured to send the first hash value to the first electronic device; the first hash value is used for determining that the current page needs to be updated if the first hash value is different from a pre-stored second hash value; the pre-stored second hash value is used for indicating the script code before updating of the current page;
a fourth receiving unit, configured to receive a deletion request sent by the first electronic device; the deleting request is used for indicating to run an uninstaller, the deleting request is generated based on a page switching instruction, and the page switching instruction is used for indicating to switch from a current page to another page;
And the running unit is used for running the uninstaller and deleting the script code corresponding to the current page stored by the first electronic device based on the uninstaller.
22. An electronic device, comprising:
at least one processor; and
a memory communicatively coupled to the at least one processor; wherein, the liquid crystal display device comprises a liquid crystal display device,
the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the method of any one of claims 1-19.
23. A non-transitory computer readable storage medium storing computer instructions for causing the computer to perform the method of any one of claims 1-19.
CN202210648809.XA 2022-06-09 2022-06-09 Page fusion method, device and equipment based on different code platforms Active CN114924826B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210648809.XA CN114924826B (en) 2022-06-09 2022-06-09 Page fusion method, device and equipment based on different code platforms

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210648809.XA CN114924826B (en) 2022-06-09 2022-06-09 Page fusion method, device and equipment based on different code platforms

Publications (2)

Publication Number Publication Date
CN114924826A CN114924826A (en) 2022-08-19
CN114924826B true CN114924826B (en) 2023-08-01

Family

ID=82812119

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210648809.XA Active CN114924826B (en) 2022-06-09 2022-06-09 Page fusion method, device and equipment based on different code platforms

Country Status (1)

Country Link
CN (1) CN114924826B (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7640512B1 (en) * 2000-12-22 2009-12-29 Automated Logic Corporation Updating objects contained within a webpage
CN103279373A (en) * 2013-05-31 2013-09-04 广州市动景计算机科技有限公司 Method and device for updating browser shell functions
CN106528587A (en) * 2016-09-12 2017-03-22 腾讯科技(深圳)有限公司 Page display method and apparatus in composite webpage system
CN108228282A (en) * 2018-04-04 2018-06-29 北京三快在线科技有限公司 For the method and device of Website page loading
CN110058895A (en) * 2019-03-07 2019-07-26 上海七印信息科技有限公司 A kind of method of browser heavily loaded expansion plugin automatically

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7640512B1 (en) * 2000-12-22 2009-12-29 Automated Logic Corporation Updating objects contained within a webpage
CN103279373A (en) * 2013-05-31 2013-09-04 广州市动景计算机科技有限公司 Method and device for updating browser shell functions
CN106528587A (en) * 2016-09-12 2017-03-22 腾讯科技(深圳)有限公司 Page display method and apparatus in composite webpage system
CN108228282A (en) * 2018-04-04 2018-06-29 北京三快在线科技有限公司 For the method and device of Website page loading
CN110058895A (en) * 2019-03-07 2019-07-26 上海七印信息科技有限公司 A kind of method of browser heavily loaded expansion plugin automatically

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
B/S模式应用中页面刷新问题与解决方案;查伟忠;;电脑开发与应用(01);全文 *

Also Published As

Publication number Publication date
CN114924826A (en) 2022-08-19

Similar Documents

Publication Publication Date Title
CN113010827B (en) Page rendering method and device, electronic equipment and storage medium
US20170153909A1 (en) Methods and Devices for Acquiring Data Using Virtual Machine and Host Machine
CN109343983B (en) Information interaction method, device, equipment and storage medium between function modules
CN115309470B (en) Method, device, equipment and storage medium for loading widget
CN114035865A (en) Method, device and equipment for starting small program and storage medium
CN114924826B (en) Page fusion method, device and equipment based on different code platforms
US11071151B2 (en) Methods and apparatuses for connecting a wireless access point through an application in a user equipment
CN109922120B (en) Method and terminal for improving DNS availability
CN114090118B (en) Method, device, equipment and storage medium for starting applet
CN113986135B (en) Method, device, equipment and storage medium for processing request
CN113612643B (en) Network configuration method, device and equipment of cloud mobile phone and storage medium
CN113691403A (en) Topological node configuration method, related device and computer program product
CN114615273B (en) Data transmission method, device and equipment based on load balancing system
CN114793234B (en) Message processing method, device, equipment and storage medium
CN114896018B (en) BMC application interface language switching method, device and medium
CN116723245A (en) Application request processing method, device, equipment and storage medium
CN116578801A (en) Page rendering method and device, electronic equipment and storage medium
CN118018522A (en) Network card configuration method, device, equipment and medium
CN115469965A (en) Container access method and device, electronic equipment and readable storage medium
CN116991672A (en) Data monitoring method, device, equipment and medium
CN116647450A (en) Modification method, device, equipment and medium of Nginx configuration information
CN113535704A (en) Scanning method, device, equipment and storage medium
CN116402079A (en) Card sender control method, device, equipment and storage medium
CN117201596A (en) Edge service access method and device, electronic equipment and readable storage medium
CN116319002A (en) Single sign-on method, device, gateway equipment and storage medium

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