Browser extension updating method and device, storage medium and electronic equipment

By implementing browser extension update methods on the server side, including obtaining, checking and issuing extended update files, the cumbersome update process in the existing technology is solved and the server efficiency is improved.

CN119544697APending Publication Date: 2025-02-28BEIJING HONGTENG INTELLIGENT TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202311108402.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-08-30
Publication Date
2025-02-28

AI Technical Summary

Technical Problem

The prior art has cumbersome operation process when updating browser extensions, which affects the efficiency of the server to obtain extension update files.

Method used

By implementing a browser extension update method on the server side, it includes obtaining the target file data based on the update configuration link address, verifying the data, and sending the extended update file to the client of the target browser extension.

Benefits of technology

This method can promptly obtain and issue extended update files for target browser extensions, improving the efficiency of server obtaining and issuing extended update files.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119544697A_ABST
    Figure CN119544697A_ABST
Patent Text Reader

Abstract

The embodiment of the invention discloses a browser extension updating method and device, a storage medium and electronic equipment, and the method comprises the steps that a server firstly obtains target file data aiming at target browser extension based on an updating configuration link address, then carries out updating data verification on the target file data to obtain a data verification result, and sends the data verification result to a server; based on the data verification result, it is determined that the target file data contains an extension update file for the target browser extension, finally, the extension update file is sent to at least one client corresponding to the target browser extension, and the client has installed the target browser extension in a browser. Therefore, the efficiency of acquiring the extended update file by the server is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of browser extensions, and in particular to a browser extension updating method, device, storage medium and electronic device. Background Art

[0002] A browser extension is a software program that can enhance the functionality of a browser. Browser extensions are usually compiled using Javascript and run in the browser's Javascript engine, which is more secure for users. It is also more convenient for users to use browser extensions because browser extensions are usually integrated into the browser toolbar or menu, and no additional windows need to be opened during use.

[0003] In short, browser extensions can help users use browsers more efficiently while also ensuring the security of their devices. Summary of the invention

[0004] The embodiments of the present application provide a browser extension update method, device, computer storage medium, and electronic device, which can timely obtain extension update files for target browser extensions, thereby improving the efficiency of the server in obtaining extension update files. The technical solution is as follows:

[0005] In a first aspect, an embodiment of the present application provides a method for updating a browser extension, which is applied to a server, and the method includes:

[0006] Obtain target file data for the target browser extension based on the update configuration link address;

[0007] Performing update data verification on the target file data to obtain a data verification result;

[0008] Determining, based on the data verification result, that the target file data includes an extension update file for the target browser extension;

[0009] The extension update file is sent to at least one client corresponding to the target browser extension, where the client has installed the target browser extension in its browser.

[0010] In a feasible implementation manner, the step of acquiring target file data for a target browser extension based on an update configuration link address includes:

[0011] At a target time indicated by a preset update detection time, target file data for a target browser extension is obtained based on an update configuration link address.

[0012] In a feasible implementation manner, performing update data verification on the target file data to obtain a data verification result includes:

[0013] Performing a specified field existence check on the target file data to obtain a field check result corresponding to the target file data;

[0014] If the type of the field verification result is the specified field existence type, a data comparison and verification is performed on the target file data to obtain a data verification result corresponding to the target file data.

[0015] In a feasible implementation manner, performing a specified field existence check on the target file data to obtain a field check result corresponding to the target file data includes:

[0016] Parsing the target file data to obtain at least one reference field recorded in the target file data;

[0017] If the field quantity of the reference field is the target value and the reference field is of the target field type, generating a first field check result of the specified field existence type;

[0018] If the field quantity of the reference field is not the target value and / or the reference field is not of the target field type, a second field check result of the specified field non-existence type is generated.

[0019] In a feasible implementation manner, performing data comparison and verification on the target file data to obtain a data verification result corresponding to the target file data includes:

[0020] Determine an extension download address for the target browser extension based on the target file data;

[0021] Acquire an extension update file for the target browser extension based on the extension download address, parse the extension update file, and obtain target field information for the target browser extension;

[0022] The target field information is compared and verified to obtain a data verification result corresponding to the target file data.

[0023] In a feasible implementation manner, comparing and verifying the target field information to obtain a data verification result corresponding to the target file data includes:

[0024] Acquire reference field information of at least one reference field recorded in the target file data;

[0025] If the reference field information and the target field information are the same, obtaining an extension identifier and an update version number corresponding to the target browser extension stored in a database, and if the target extension identifier in the target field information is the same as the extension identifier, and the target update version number in the target field information is greater than the update version number, generating a first data verification result that determines that the target file data includes an extension update file for the target browser extension;

[0026] If the reference field information and the target field information are different, a second data verification result is generated to determine that the target file data does not include an extension update file for the target browser extension.

[0027] In a feasible implementation manner, sending the extension update file to at least one client corresponding to the target browser extension includes:

[0028] If it is detected that at least one client corresponding to the target browser extension establishes a communication connection with the server, the extension update file is sent to the client.

[0029] In a feasible implementation manner, before acquiring the target file data for the target browser extension based on the update configuration link address, the method further includes:

[0030] The target browser extension configuration corresponding to the browser is updated with a configuration link address, wherein the updated configuration link address is used to perform browser extension update on a client that has installed the target browser extension.

[0031] In a feasible implementation manner, before updating the configuration link address of the target browser extension configuration corresponding to the browser, the method further includes:

[0032] In response to an add-extension update request for a target browser extension of a browser, an update configuration link address for the target browser extension in the add-extension update request is obtained.

[0033] In a second aspect, an embodiment of the present application provides a browser extension update device, which is applied to a server, and the device includes:

[0034] A data acquisition module, used to acquire target file data for a target browser extension based on an update configuration link address;

[0035] A data verification module is used to perform update data verification on the target file data to obtain a data verification result;

[0036] A verification and determination module, configured to determine, based on the data verification result, that the target file data includes an extension update file for the target browser extension;

[0037] The file sending module is used to send the extension update file to at least one client corresponding to the target browser extension, and the client has installed the target browser extension in the browser.

[0038] In a third aspect, an embodiment of the present application provides a computer storage medium, wherein the computer storage medium has a plurality of instructions, and the instructions are suitable for being loaded by a processor and executing the above-mentioned method steps.

[0039] In a fourth aspect, an embodiment of the present application provides an electronic device, which may include: a memory and a processor; wherein the memory stores a computer program, and the computer program is suitable for being loaded by the memory and executing the above-mentioned method steps.

[0040] The beneficial effects brought by the technical solution provided by the embodiment of the present application include at least:

[0041] In an embodiment of the present application, the server first obtains the target file data for the target browser extension based on the update configuration link address, then performs update data verification on the target file data to obtain a data verification result, determines based on the data verification result that the target file data contains an extension update file for the target browser extension, and finally sends the extension update file to at least one client corresponding to the target browser extension, and the client has installed the target browser extension in the browser. Through the above method, the embodiment of the present application can obtain the extension update file for the target browser extension in a timely manner when there is an update to the target browser extension, and then can send the extension update file to the client that has installed the browser extension in a timely manner. Therefore, the embodiment of the present application improves the efficiency of the server in obtaining the extension update file, and then improves the efficiency of the server in sending the extension update file to the client. BRIEF DESCRIPTION OF THE DRAWINGS

[0042] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without paying any creative work.

[0043] Figure 1 It is a flowchart of a browser extension updating method provided in an embodiment of the present application;

[0044] Figure 2 It is a flowchart of another browser extension updating method provided in an embodiment of the present application;

[0045] Figure 3It is a system architecture diagram provided by an embodiment of the present application;

[0046] Figure 4 It is a structural schematic diagram of a browser extension updating device provided in an embodiment of the present application;

[0047] Figure 5 It is a structural schematic diagram of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0048] In order to make the purpose, features, and advantages of the embodiments of the present application more obvious and understandable, the technical solutions in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of this application.

[0049] In the description of the present application, it should be understood that the terms "first", "second", etc. are only used for descriptive purposes and cannot be understood as indicating or implying relative importance. In the description of the present application, it should be noted that, unless otherwise clearly specified and limited, "including" and "having" and any of their variations are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device that includes a series of steps or units is not limited to the listed steps or units, but optionally also includes steps or units that are not listed, or optionally also includes other steps or units inherent to these processes, methods, products or devices. For those of ordinary skill in the art, the specific meanings of the above terms in the present application can be understood in specific circumstances. In addition, in the description of the present application, unless otherwise specified, "multiple" refers to two or more. "And / or" describes the association relationship of associated objects, indicating that there can be three relationships, for example, A and / or B, which can represent: A exists alone, A and B exist at the same time, and B exists alone. The character " / " generally indicates that the associated objects before and after are an "or" relationship.

[0050] In the related art, for a technician who develops a browser extension, each time the developed browser extension is updated, the technician needs to upload the updated extension file of the browser extension to the server corresponding to the browser, and then instruct the server to send the updated extension file to the client that has installed the browser extension. Therefore, the existing technician's operation process of updating the latest extension update file of the browser extension is relatively cumbersome, which affects the efficiency of the server in obtaining the extension update file.

[0051] In the following method embodiments, for the sake of convenience, only the electronic device is used as the execution subject of each step for introduction and description.

[0052] See also Figure 1 , is a flowchart of a browser extension update method provided in an embodiment of the present application. Figure 1 As shown, the method of the embodiment of the present application may include the following steps:

[0053] S101, acquiring target file data for a target browser extension based on an update configuration link address.

[0054] It is easy to understand that the update configuration link address refers to the file path used to store the target file data of the browser extension.

[0055] The target browser extension may refer to one of many browser extensions.

[0056] The target file data may be data stored in the form of an XML file, and may include information such as the download address of the extension update file, the version number of the extension update file, md5 data, and the extension identifier of the target browser extension.

[0057] The extension update file refers to the extension file before the browser extension is updated, which becomes the extension update file after the browser extension is updated. For example, the permission information of the target browser extension is updated. This update mainly adds the permission information that the target browser extension needs to obtain. Correspondingly, the original extension file of the target browser extension also needs to be updated, so the extension update file can be obtained.

[0058] The version number of the extended update file can be used to distinguish extended files with different data contents. Different version numbers of the extended update file can indicate that the data content contained in the extended update file obtained by each update of the extended file has changed.

[0059] md5 data refers to data calculated using a message digest algorithm. In the embodiment of the present application, md5 data can be used as a digital fingerprint to check whether the target file data has changed before and after, so as to ensure the accuracy of the target file data.

[0060] The extension ID of the target browser extension, which can be used to uniquely identify the browser extension.

[0061] In some embodiments, the server may have a local data table for storing multiple update configuration link addresses. Each update configuration link address in the data table may correspond to a browser extension identifier. The browser extension identifier is used to represent a unique browser extension. If the server wants to obtain target file data about the target browser extension, it can query the update configuration link address corresponding to the identifier of the target browser extension in the above data table according to the identifier of the target browser extension, and then access the queried update configuration link address, download the specified file in the page indicated by the update configuration link address, and the data stored in the specified file is the target file data for the target browser extension. Then, the specified file can be parsed to obtain the data stored in the specified file, that is, the operation of obtaining the target file data is realized.

[0062] S102, performing update data verification on the target file data to obtain a data verification result.

[0063] In some embodiments, the target file data is verified for update data, and two data verification results can be obtained. One verification result can be a first verification result that determines that the target file data contains an extension update file for the target browser extension; the other verification result can be a second verification result that determines that the target file data does not contain an extension update file for the target browser extension. The target file data is verified for update data, which can be divided into a first verification operation and a second verification operation. The first verification result can be generated in the first verification operation; the second verification result can be generated in the first verification operation or in the second verification operation.

[0064] The first verification operation may be to perform a verification on the target file data to determine whether the specified field exists, that is, to verify whether the target file data contains the specified field. The number of the specified fields is one or more. In the case where the number of the specified fields is one, if it is determined through verification that the specified field exists in the target file data, a second verification operation is performed to determine the data verification result; otherwise, the above-mentioned second verification result may be generated. In the case where the number of the specified fields is multiple, if it is determined through verification that the target file data contains the multiple specified fields, a second verification operation may be performed to determine the data verification result; if it is determined through verification that at least one of the multiple specified fields is missing in the target file data, the above-mentioned second verification result may be generated.

[0065] The second verification operation may be to verify the data content of the target file data, that is, first obtain the extension update file according to the download address of the extension update file stored in the target file data, and then verify the specified content in the extension update file. The specified content may include the version number corresponding to the target browser extension, the extension identifier of the target browser extension, and md5 data. If the verification of the specified content is successful, the above-mentioned first verification result may be generated. If the verification of the specified content fails, the above-mentioned second verification result may be generated.

[0066] S103: Determine, based on the data verification result, that the target file data includes an extension update file for the target browser extension.

[0067] In some embodiments, there are two data verification results listed in S102. If the first verification result is obtained, it can be determined that the target file data includes an extension update file for the target browser extension.

[0068] In another embodiment, if the above second verification result is obtained, it can be determined that the target file data does not include an extension update file for the target browser extension.

[0069] S104: Send the extension update file to at least one client corresponding to the target browser extension.

[0070] Specifically, in S102, the extension update file can be obtained according to the download address of the extension update file stored in the target file data, that is, after the operation of S102, the extension update file can be downloaded locally. Then, the server can send the extension update file downloaded locally to a client corresponding to the target browser extension.

[0071] In an embodiment of the present application, the server first obtains the target file data for the target browser extension based on the update configuration link address, then performs update data verification on the target file data to obtain a data verification result, determines based on the data verification result that the target file data contains an extension update file for the target browser extension, and finally sends the extension update file to at least one client corresponding to the target browser extension, and the client has installed the target browser extension in the browser. Through the above method, the embodiment of the present application can obtain the extension update file for the target browser extension in a timely manner when there is an update to the target browser extension, and then can send the extension update file to the client that has installed the browser extension in a timely manner. Therefore, the embodiment of the present application improves the efficiency of the server in obtaining the extension update file, and then improves the efficiency of the server in sending the extension update file to the client.

[0072] See also Figure 2, which is a flow chart of a browser extension updating method provided in an embodiment of the present application.

[0073] Before describing the operation of the embodiment of the present application, please refer to Figure 3 A system architecture diagram of a browser extension updating method is shown. Figure 2 The browser extension update method shown can be applied to Figure 3 The system architecture diagram shown. Figure 3 An electronic device 301, a server 302 and a client 303, as well as the communication relationship between them are shown.

[0074] In the embodiment of the present application, the electronic device 301 may include but is not limited to a terminal and a server. The electronic device 301 may generate an extension update file of the target browser extension, may store an update file of the target browser extension, may upload target file data for the target browser extension in the update configuration link address, and may also be used to send an add extension update request for the target browser extension of the browser to the server 302. The server 302 receives the add extension update request and performs the operations S201-S210 in the embodiment of the present application. The client 303 is used to establish a communication connection with the server 302 and receive the extension update file sent by the server 302.

[0075] Specifically, in Figure 3 Based on the system architecture diagram shown in Figure 2 The operations shown are explained in detail.

[0076] like Figure 2 As shown, the method of the embodiment of the present application may include the following steps:

[0077] S201, in response to an add-extension update request for a target browser extension of a browser, obtaining an update configuration link address for the target browser extension in the add-extension update request.

[0078] It is easy to understand that a browser refers to an application for retrieving, displaying and transmitting network information resources. The target browser extension can be an extension application installed in the browser.

[0079] Add extension request refers to a request for informing the server of the basic information of the target browser extension to be updated in the future and the update configuration link address of the extension update file after the target browser extension is updated, so that the server obtains the extension update file according to the update configuration link address, and then updates the extension update file to the client that has installed the target browser extension. In addition, the add extension request can also carry a specified update detection time. The specified update detection time is used to instruct the server to perform an operation of obtaining the extension update file according to the update configuration link address once every specified update detection. For example, the specified update detection time can be set to 12 hours, indicating that the server needs to perform an operation of obtaining the extension update file according to the update configuration link every 12 hours.

[0080] The request to add extensions can be sent to the server by a terminal that generates / stores the extension update file of the target browser extension. The request to add extension updates can also be sent to the server by a storage server that generates / stores the extension update file of the target browser extension.

[0081] The basic information of the target browser extension may include information such as the name of the target browser extension, the extension version number of the target browser extension, and the extension identifier of the target browser extension.

[0082] The update configuration link address may be a file path for storing target file data for browser extensions. For example, the update configuration link address of an embodiment of the present application may be "********** / abupdate.xml", where the asterisk before " / " may represent the storage path of the target file data, and "abupdate.xml" represents the file name.

[0083] In some embodiments, the server may receive an add-extension update request for a target browser extension sent by a terminal that generates an extension update file for the target browser extension. Alternatively, the server may receive an extension update request for a target browser extension sent by a storage server that stores the extension update file for the target browser extension. In response to the received add-extension request, if the content of the add-extension request is a ciphertext encrypted using a public key of the server, the server may decrypt the ciphertext using its own private key to obtain a plaintext corresponding to the add-extension request, and may read an update configuration link address for the target browser extension from the plaintext.

[0084] S202, updating the configuration link address of the target browser extension configuration corresponding to the browser.

[0085] In some embodiments, a running script for automatically obtaining an extension update file corresponding to the target browser extension can be generated locally on the server for the target browser extension corresponding to the browser, and the update configuration link address can be written into the running script to implement the operation of configuring the update link address for the target browser extension. The update configuration link address can be used by the server to update the browser extension for the client that has installed the target browser extension. The principle of the update can be that the server obtains the extension update file of the target browser extension according to the update configuration link address, and then sends the extension update file to the client that has installed the target browser extension, so that the client updates the target browser extension.

[0086] S203: At the target time indicated by the preset update detection time, obtain target file data for the target browser extension based on the update configuration link address.

[0087] The preset update detection time may be the update detection time set by the server for the target browser extension. For different target browser extensions, the server may set the same preset update detection time for them, or may set different preset update detection times for them. Alternatively, the preset update detection time may be the specified update detection time parsed by the server from the add extension request; in this case, the preset update detection time may be set by the technician corresponding to the terminal that sends the add extension request to the server, or may be set by the technician corresponding to the storage server that sends the add extension request to the server. The specified update detection time, the terminal that sends the add extension request to the server, and the storage that sends the add extension request to the server are not explained here, and their meanings are the same as the meanings of the same words described in S201.

[0088] For example, the preset update detection time may be set to 15 hours, which means that the server needs to perform an operation of obtaining the extension update file according to the update configuration link every 15 hours.

[0089] Specifically, multiple target moments indicated by the preset update time can be calculated based on the initial moment. When each target moment is reached, the update configuration link address can be accessed to obtain the download entry of the xml file for the target browser extension. Click the download entry to download the xml file to the local computer. The data stored in the xml file is the target file data. The initial moment can refer to the moment when the server obtains the update configuration link address for the target browser extension in the extension update request. If the preset update detection time is set to 15 hours, the first target moment is the moment 15 hours added to the initial moment, the second target moment after the first target moment is the moment 30 hours added to the initial moment, and so on. The Nth target moment after the first target moment is the moment 15*N hours added to the initial moment.

[0090] S204: parse the target file data to obtain at least one reference field recorded in the target file data.

[0091] It is easy to understand that the reference field refers to the attribute field of the target browser extension. The attribute field of the target browser extension may include the version number of the target browser extension, the extension identifier of the target browser extension, md5 data and other fields. These fields can all be reference fields.

[0092] In some embodiments, the target file data may include multiple reference fields and the value of each reference field. Since the target file data is data stored in an XML file, it can be parsed according to the document structure of the XML file to obtain at least one reference field recorded in the target file data.

[0093] The document structure of an XML file may include information such as declaration part, tags, elements, root elements, attribute fields, etc. For example, "<?xml version="1.0" encoding="utf-8"?>" appears in an XML file, which can represent the declaration part, and version="1.0" here can mean that the document complies with the XML 1.0 specification.<app extendid="ckagkdhdlefllm*******"> ", which can indicate that the attribute value of the attribute field extendid of the element named app is ckagkdhdlefllm*******, where the attribute field extendid can be understood as the extension identifier of the target browser extension in the embodiment of the present application. "<updatecheck version="1.2.0"md5="2284***d189f" / > ", which can indicate that the attribute value of the attribute field version of the element named updatecheck is 1.2.0, and the attribute value of the attribute field md5 of the element named updatecheck is 2284***d189f. The attribute field version here can be understood as the version number of the target browser extension in the embodiment of the present application, and the attribute field md5 here can be understood as the md5 data in the embodiment of the present application. Therefore, by parsing the target file data according to the document structure of the xml file, it is easy to obtain multiple attribute fields recorded in the target file data, namely, reference fields.

[0094] S205: If the field quantity of the reference field is the target value and the reference field is of the target field type, a first field verification result of the specified field existence type is generated.

[0095] Specifically, the number of fields of all reference fields and the field type of each reference field can be determined. The target value set in the embodiment of the present application can be 3, and the target field type can be a version type, an md5 type, and an id type. If the reference field includes the attribute field extendid, the attribute field version, and the attribute field md5 listed above, it can be determined that the number of fields of all reference fields is 3, which meets the target value, and the field type of the attribute field extendid hits the id type, the field type of the attribute field version hits the version type, and the field type of the attribute field md5 hits the md5 type, that is, the number of fields of the reference field is the target value and the reference field is the target field type, then a first field verification result of the specified field existence type can be generated, that is, the result type is a field verification result of the specified existence type.

[0096] S206: If the field quantity of the reference field is not the target value and / or the reference field is not of the target field type, a second field verification result of a type in which the specified field does not exist is generated.

[0097] Specifically, referring to the target value and target field type set in S205, if the number of fields of the reference field is greater than or less than the target value, regardless of whether the field type of each reference field hits any target field type, a second field verification result of the type of the specified field not existing can be generated. Alternatively, if there is a reference field whose field type is not any target field type, regardless of whether the number of fields of the reference field is the number of fields, a second field verification result of the type of the specified field not existing can be generated. Alternatively, if the field of the reference field is greater than or less than the target value, and at the same time there is a reference field whose field type is not any target field type, a second field verification result of the type of the specified field not existing can be generated.

[0098] S207: Determine an extension download address for the target browser extension based on the target file data.

[0099] It is easy to understand that the extension download address refers to the address used to download the extension update file.

[0100] In some embodiments, after obtaining a field verification result with a result type of a specified existence type, an extension download address for a target browser extension recorded in the target file data may be identified.

[0101] For example: A tag can be recorded in the target file data: " <updatecheck codebase="https: / / download.chrome.360.cn / ext / extmtotaxlt_1.2.0.crx"version="1.2.0"md5="22842408e7d102e0019fe38dc8dd189f" / > . In this tag, updatecheck can represent an element name, codebase, version, and md5 can represent multiple attribute fields of updatecheck. codebase can represent an address field, and the value of codebase is the extension download address in the embodiment of the present application. version can represent a version field, and the value of version is the version number of the target browser extension in the embodiment of the present application. md5 can represent an md5 field, and the value of md5 is the md5 data in the embodiment of the present application.

[0102] S208, acquiring an extension update file for the target browser extension based on the extension download address, parsing the extension update file, and obtaining target field information for the target browser extension.

[0103] Extension update file refers to the extension program file after the target browser extension is updated. Extension update file can include at least two files, one is a script file with the extension name .js, and the other is a file named manifest.json. Some extension update files can also include a css file, an image file, and an html web page file.

[0104] In the embodiment of the present application, the target field information refers to the target field and the attribute value of the target field. The target field may include the version number of the target browser extension, the extension identifier of the target browser extension, and md5, and the attribute value of the target field is the assigned data of these fields. Specifically, the extension download address may be accessed, and the extension update file stored in the extension download address may be downloaded locally. Furthermore, the sub-files contained in the extension update file may be parsed to obtain the target field information. For example, the target field information may be stored in a .json file, and the .json file may be identified to obtain the target field information.

[0105] S209, comparing and verifying the target field information to obtain a data verification result corresponding to the target file data.

[0106] Specifically, the reference field information of at least one reference field recorded in the target file data can be obtained. If the reference field information and the target field information are the same, the extension identifier and the update version number corresponding to the target browser extension stored in the database are obtained. If the target extension identifier in the target field information is the same as the extension identifier, and the target update version number in the target field information is greater than the update version number, a first data verification result is generated to determine that the target file data contains an extension update file for the target browser extension. If the reference field information and the target field information are different, a second data verification result is generated to determine that the target file data does not contain an extension update file for the target browser extension.

[0107] The reference field information may refer to the attribute value of the reference field, which may be understood as the value assignment data of the reference field.

[0108] As the reference field described in S204, the target file data has the version number of the target browser extension, the extension identifier of the target browser extension, and the md5 data recorded in the tag. The extension update file also records the version number of the target browser extension, the extension identifier of the target browser extension, and the md5 data. The version number recorded in the tag of the target file data can be compared with the version number recorded in the extension update file, the extension identifier recorded in the tag of the target file data can be compared with the extension identifier recorded in the extension update file, and the md5 data recorded in the tag of the target file data can be compared with the md5 data recorded in the extension update file. If the version number is the same, the extension identifier is the same, and the md5 data is the same, then the extension identifier and the update version number corresponding to the target browser extension recorded in the database are obtained. If the extension identifier recorded in the extension update file is the same as the extension identifier recorded in the database, then the version number recorded in the extension update file is compared to see whether it is greater than the update version number recorded in the database. If the version number in the extension update file is greater than the version number in the database, a first data verification result can be generated to determine that the target file data contains the extension update file.

[0109] If any one of the version number, identifier, and md5 data recorded in the target file data is different from the corresponding data recorded in the extended update file, a second data verification result can be generated to determine that the target file data does not include the extended update file.

[0110] If the version number, identifier, and md5 data recorded in the target file data are the same as the corresponding data recorded in the extended update file, but the version identifier recorded in the extended update file is different from the version identifier recorded in the database, a second data verification result can also be generated to determine that the target file data does not contain the extended update file.

[0111] If the version number, identifier, and md5 data recorded in the target file data are the same as the corresponding data recorded in the extended update file, and the version identifier recorded in the extended update file is the same as the version identifier recorded in the database, but the version number recorded in the extended update file is less than or equal to the version number recorded in the database, a second data verification result can also be generated to determine that the target file data does not contain the extended update file.

[0112] S210: Determine, based on the data verification result, that the target file data includes an extension update file for a target browser extension.

[0113] Specifically, based on the first data verification result in S209 , it can be determined that the target file data includes an extended update file.

[0114] S211: If it is detected that at least one client corresponding to the target browser extension has established a communication connection with the server, the extension update file is sent to the client.

[0115] In the embodiment of the present application, the client refers to a terminal that has installed the target browser extension. After obtaining the data verification result of determining that the target file data includes the extension update file in S209, when it is detected that at least one client corresponding to the target browser extension has established a communication connection with the server, the extension update file downloaded locally by the server during the aforementioned operation process can be sent to the client. By sending the extension update file to the client when it is detected that the client has established a communication connection with the server, the problem of slow file transmission speed caused by the server sending a large number of extension update files in a centralized manner is avoided.

[0116] In addition, after the data verification result that the target file data includes the extension update file is obtained in S209, the extension information of the target browser extension currently updated is determined according to the extension update file. Then, the server can update the relevant information of the target browser extension stored in the database according to the extension information currently updated. For example, the locally updated extension information can be the newly added permission information, and the server can write the newly added permission information into the database to ensure the accuracy of the extension information stored in the database of the server.

[0117] In an embodiment of the present application, the server responds to an extension update request, obtains an update configuration link address for the target browser extension, then configures the update configuration link address, and at a target time indicated by a preset update detection time, obtains target file data for the target browser extension according to the update configuration link address, and then performs subsequent data verification operations on the target file data. The data verification operation mainly compares the field information recorded in the target file data with the field information recorded in the extension update file, and compares the field information recorded in the extension update file with the field information of the target browser extension recorded in the database, so that when it is determined that the target file data contains the extension update file, the extension update file is sent to the client when a communication connection is established with the client, so that the client can update the locally installed target browser extension according to the extension update file. In the method, the server does not need to receive the extended update file multiple times after each update sent by the terminal that generates the extended update file of the target browser extension, or the server does not need to receive the extended update file multiple times after each update sent by the storage server that stores the extended update file of the target browser extension. The server only needs to configure the update configuration link address according to a single extension update request, and then the server only needs to periodically detect whether there is an extended update file of the target browser according to the update configuration link address. This not only saves manpower for sending the extended update file to the server each time, improves the efficiency of sending the extended update file to the server, but also improves the efficiency of the server in obtaining the extended update file. In addition, through multiple data verification operations, the accuracy of the extended update file sent to the client is also guaranteed.

[0118] See also Figure 4 , is a schematic diagram of the structure of a browser extension update device provided in an embodiment of the present application. The browser extension update device 400 can be implemented as all or part of a terminal through software, hardware, or a combination of both. The device 400 includes:

[0119] A data acquisition module 410 is used to acquire target file data for a target browser extension based on an update configuration link address;

[0120] The data verification module 420 is used to perform update data verification on the target file data to obtain a data verification result;

[0121] A verification and determination module 430, configured to determine, based on the data verification result, whether the target file data includes an extension update file for the target browser extension;

[0122] The file sending module 440 is used to send the extension update file to at least one client corresponding to the target browser extension, where the client has installed the target browser extension in its browser.

[0123] Optionally, the data acquisition module includes:

[0124] The data acquisition unit is used to acquire target file data for a target browser extension based on an update configuration link address at a target time indicated by a preset update detection time.

[0125] Optionally, the data verification module includes:

[0126] A first verification unit, configured to perform a verification on the existence of a specified field of the target file data to obtain a field verification result corresponding to the target file data;

[0127] The second verification unit is used to perform data comparison verification on the target file data if the type of the field verification result is the specified field existence type, so as to obtain the data verification result corresponding to the target file data.

[0128] Optionally, the first verification unit includes:

[0129] A first check subunit is used to parse the target file data to obtain at least one reference field recorded in the target file data;

[0130] A second verification subunit, configured to generate a first field verification result of a specified field existence type if the field quantity of the reference field is a target value and the reference field is a target field type;

[0131] The third verification subunit is used to generate a second field verification result of a type that a specified field does not exist if the field quantity of the reference field is not a target value and / or the reference field is not a target field type.

[0132] Optionally, the second verification unit includes:

[0133] An address determination unit, configured to determine an extension download address for the target browser extension based on the target file data;

[0134] A field acquisition unit, configured to acquire an extension update file for the target browser extension based on the extension download address, parse the extension update file, and obtain target field information for the target browser extension;

[0135] The field verification unit is used to compare and verify the target field information to obtain a data verification result corresponding to the target file data.

[0136] Optionally, the field verification unit includes:

[0137] A first field checking subunit, used to obtain reference field information of at least one reference field recorded in the target file data;

[0138] a second field verification subunit, configured to obtain, if the reference field information and the target field information are the same, an extension identifier and an update version number corresponding to the target browser extension stored in a database, and generate, if the target extension identifier in the target field information is the same as the extension identifier and the target update version number in the target field information is greater than the update version number, a first data verification result for determining that the target file data includes an extension update file for the target browser extension;

[0139] The third field verification subunit is used to generate a second data verification result for determining that the target file data does not include an extension update file for the target browser extension if the reference field information and the target field information are different.

[0140] Optionally, the file sending module includes:

[0141] The file sending unit is configured to send the extension update file to the client if it is detected that at least one client corresponding to the target browser extension has established a communication connection with the server.

[0142] Optionally, the browser extension updating device further includes:

[0143] The address configuration module is used to configure an update configuration link address for a target browser extension corresponding to the browser, and the update configuration link address is used to perform browser extension update on a client that has installed the target browser extension.

[0144] Optionally, the browser extension updating device further includes:

[0145] The address acquisition module is used to respond to an add extension update request for a target browser extension of the browser and acquire an update configuration link address for the target browser extension in the add extension update request.

[0146] Please refer to Figure 5 , Figure 5 This is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application. Figure 5 As shown, the electronic device 500 may include: at least one processor 501 , at least one network interface 504 , a user interface 503 , a memory 505 , a display screen component 506 , and at least one communication bus 502 .

[0147] The communication bus 502 is used to realize the connection and communication between these components.

[0148] The user interface 503 may include a display screen (Display) and a camera (Camera), and the optional user interface 503 may also include a standard wired interface and a wireless interface.

[0149] The network interface 504 may optionally include a standard wired interface or a wireless interface (such as a WI-FI interface).

[0150] Among them, the processor 501 may include one or more processing cores. The processor 501 uses various interfaces and lines to connect various parts of the entire electronic device 500, and executes various functions and processes data of the electronic device 500 by running or executing instructions, programs, code sets or instruction sets stored in the memory 505, and calling data stored in the memory 505. Optionally, the processor 501 can be implemented in at least one hardware form of digital signal processing (Digital Signal Processing, DSP), field programmable gate array (Field-Programmable Gate Array, FPGA), and programmable logic array (Programmable Logic Array, PLA). The processor 501 can integrate one or a combination of a central processing unit (Central Processing Unit, CPU), a search engine library builder (Graphics Processing Unit, GPU) and a modem. Among them, the CPU mainly processes the operating system, user interface and application programs; the GPU is responsible for rendering and drawing the content to be displayed on the display screen; the modem is used to process wireless communications. It can be understood that the above-mentioned modem may not be integrated into the processor 501, and it can be implemented separately through a chip.

[0151] Among them, the memory 505 may include a random access memory (Random Access Memory, RAM) and may also include a read-only memory (Read-Only Memory). Optionally, the memory 505 includes a non-transitory computer-readable storage medium. The memory 505 can be used to store instructions, programs, codes, code sets or instruction sets. The memory 505 may include a program storage area and a data storage area, wherein the program storage area may store instructions for implementing an operating system, instructions for at least one function (such as a touch function, a sound playback function, an image playback function, etc.), instructions for implementing the above-mentioned various method embodiments, etc.; the data storage area may store data involved in the above-mentioned various method embodiments, etc. The memory 505 may also be optionally at least one storage device located away from the aforementioned processor 501. As Figure 5 As shown, the memory 505 as a computer storage medium may include an operating system, a network communication module, a user interface module, and a program of a browser extension update method.

[0152] exist Figure 5 In the electronic device shown, the processor 501 can be used to call the program of the browser extension update method stored in the memory 505, and specifically perform the following operations:

[0153] Obtain target file data for the target browser extension based on the update configuration link address;

[0154] Performing update data verification on the target file data to obtain a data verification result;

[0155] Determining, based on the data verification result, that the target file data includes an extension update file for the target browser extension;

[0156] The extension update file is sent to at least one client corresponding to the target browser extension, where the client has installed the target browser extension in its browser.

[0157] In one embodiment, when the processor 501 executes the method of acquiring the target file data for the target browser extension based on the update configuration link address, the processor 501 specifically performs the following operations:

[0158] At a target time indicated by a preset update detection time, target file data for a target browser extension is obtained based on an update configuration link address.

[0159] In one embodiment, when the processor 501 performs the update data verification on the target file data and obtains the data verification result, the processor 501 specifically performs the following operations:

[0160] Performing a specified field existence check on the target file data to obtain a field check result corresponding to the target file data;

[0161] If the type of the field verification result is the specified field existence type, a data comparison and verification is performed on the target file data to obtain a data verification result corresponding to the target file data.

[0162] In one embodiment, when the processor 501 performs the specified field existence check on the target file data and obtains the field check result corresponding to the target file data, the processor 501 specifically performs the following operations:

[0163] Parsing the target file data to obtain at least one reference field recorded in the target file data;

[0164] If the field quantity of the reference field is the target value and the reference field is of the target field type, generating a first field check result of the specified field existence type;

[0165] If the field quantity of the reference field is not the target value and / or the reference field is not of the target field type, a second field check result of the specified field non-existence type is generated.

[0166] In one embodiment, when the processor 501 performs the data comparison and verification on the target file data to obtain the data verification result corresponding to the target file data, the processor 501 specifically performs the following operations:

[0167] Determine an extension download address for the target browser extension based on the target file data;

[0168] Acquire an extension update file for the target browser extension based on the extension download address, parse the extension update file, and obtain target field information for the target browser extension;

[0169] The target field information is compared and verified to obtain a data verification result corresponding to the target file data.

[0170] In one embodiment, when the processor 501 performs the comparison and verification of the target field information to obtain the data verification result corresponding to the target file data, the processor 501 specifically performs the following operations:

[0171] Acquire reference field information of at least one reference field recorded in the target file data;

[0172] If the reference field information and the target field information are the same, obtaining an extension identifier and an update version number corresponding to the target browser extension stored in a database, and if the target extension identifier in the target field information is the same as the extension identifier, and the target update version number in the target field information is greater than the update version number, generating a first data verification result that determines that the target file data includes an extension update file for the target browser extension;

[0173] If the reference field information and the target field information are different, a second data verification result is generated to determine that the target file data does not include an extension update file for the target browser extension.

[0174] In one embodiment, when executing the step of sending the extension update file to at least one client corresponding to the target browser extension, the processor 501 specifically performs the following operations:

[0175] If it is detected that at least one client corresponding to the target browser extension establishes a communication connection with the server, the extension update file is sent to the client.

[0176] In one embodiment, before executing the acquisition of target file data for the target browser extension based on the update configuration link address, the processor 501 further performs the following operations:

[0177] The target browser extension configuration corresponding to the browser is updated with a configuration link address, wherein the updated configuration link address is used to perform browser extension update on a client that has installed the target browser extension.

[0178] In one embodiment, before executing the updating configuration link address of the target browser extension configuration corresponding to the browser, the processor 501 further performs the following operations:

[0179] In response to an add-extension update request for a target browser extension of a browser, an update configuration link address for the target browser extension in the add-extension update request is obtained.

[0180] In addition, those skilled in the art can understand that the structure of the electronic device 500 shown in the above drawings does not constitute a limitation on the electronic device 500, and the user terminal may include more or fewer components than shown in the figure, or combine certain components, or arrange the components differently. For example, the electronic device 500 also includes components such as a radio frequency circuit, an audio circuit, a WiFi component, a power supply, and a Bluetooth component, which will not be described in detail here.

[0181] An embodiment of the present application further provides a computer-readable storage medium, which stores at least one instruction, and the at least one instruction is used to be executed by a processor to implement the browser extension update method as described in the above embodiments.

[0182] An embodiment of the present application further provides a computer program product, which stores at least one instruction, and the at least one instruction is loaded and executed by the processor to implement the browser extension updating method described in the above embodiments.

[0183] Those skilled in the art should be aware that in one or more of the above examples, the functions described in the embodiments of the present application can be implemented with hardware, software, firmware, or any combination thereof. When implemented using software, these functions can be stored in a computer-readable medium or transmitted as one or more instructions or codes on a computer-readable medium. Computer-readable media include computer storage media and communication media, wherein the communication media include any media that facilitates the transmission of a computer program from one place to another. The storage medium can be any available medium that a general or special-purpose computer can access.

[0184] The above description is only an optional embodiment of the present application and is not intended to limit the present application. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present application shall be included in the protection scope of the present application.

Claims

1. A browser extension update method, applied to a server, characterized in that: The method comprises: Obtain target file data for the target browser extension based on the update configuration link address; Performing update data verification on the target file data to obtain a data verification result; Determining, based on the data verification result, that the target file data includes an extension update file for the target browser extension; The extension update file is sent to at least one client corresponding to the target browser extension, where the client has installed the target browser extension in its browser.

2. The method according to claim 1, characterized in that The step of obtaining target file data for a target browser extension based on an update configuration link address includes: At a target time indicated by a preset update detection time, target file data for a target browser extension is obtained based on an update configuration link address.

3. The method according to claim 1, characterized in that The updating data verification of the target file data to obtain the data verification result includes: Performing a specified field existence check on the target file data to obtain a field check result corresponding to the target file data; If the type of the field verification result is the specified field existence type, a data comparison and verification is performed on the target file data to obtain a data verification result corresponding to the target file data.

4. The method according to claim 3, characterized in that The performing a specified field existence check on the target file data to obtain a field check result corresponding to the target file data includes: Parsing the target file data to obtain at least one reference field recorded in the target file data; If the field quantity of the reference field is the target value and the reference field is of the target field type, generating a first field check result of the specified field existence type; If the field quantity of the reference field is not the target value and / or the reference field is not of the target field type, a second field check result of the specified field non-existence type is generated.

5. The method according to claim 3, characterized in that: The performing data comparison and verification on the target file data to obtain a data verification result corresponding to the target file data includes: Determine an extension download address for the target browser extension based on the target file data; Acquire an extension update file for the target browser extension based on the extension download address, parse the extension update file, and obtain target field information for the target browser extension; The target field information is compared and verified to obtain a data verification result corresponding to the target file data.

6. The method according to claim 5, characterized in that The comparing and verifying the target field information to obtain a data verification result corresponding to the target file data includes: Acquire reference field information of at least one reference field recorded in the target file data; If the reference field information and the target field information are the same, obtaining an extension identifier and an update version number corresponding to the target browser extension stored in a database, and if the target extension identifier in the target field information is the same as the extension identifier, and the target update version number in the target field information is greater than the update version number, generating a first data verification result that determines that the target file data includes an extension update file for the target browser extension; If the reference field information and the target field information are different, a second data verification result is generated to determine that the target file data does not include an extension update file for the target browser extension.

7. The method according to claim 1, characterized in that The step of sending the extension update file to at least one client corresponding to the target browser extension includes: If it is detected that at least one client corresponding to the target browser extension establishes a communication connection with the server, the extension update file is sent to the client.

8. A browser extension updating device, applied to a server, characterized in that: The device comprises: A data acquisition module, used to acquire target file data for a target browser extension based on an update configuration link address; A data verification module is used to perform update data verification on the target file data to obtain a data verification result; A verification and determination module, configured to determine, based on the data verification result, that the target file data includes an extension update file for the target browser extension; The file sending module is used to send the extension update file to at least one client corresponding to the target browser extension, and the client has installed the target browser extension in the browser.

9. A computer storage medium, characterized in that The computer storage medium stores a plurality of instructions, and the instructions are suitable for being loaded by a processor and executing the method steps according to any one of claims 1 to 7.

10. An electronic device, characterized in that: include: A processor and a memory; wherein the memory stores a computer program, and the computer program is suitable for being loaded by the processor and executing the method steps as claimed in any one of claims 1 to 7.