Key-value pair storage calling method and device for multi-terminal environment, medium and equipment
By receiving key-value pair definition information on the storage definition platform and generating a multi-end corresponding software development kit set, the problem of key-value pair definition conflicts in a multi-end environment is solved, and the effectiveness and consistency of key-value pair storage calls are achieved. Improved development efficiency and code quality.
Patent Information
- Application Number
- CN202410321114.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-03-20
- Publication Date
- 2024-08-27
AI Technical Summary
In a multi-end environment, the definition of key-value pairs is prone to conflicts, leading to inconsistency and potential risks in storage calls. It is especially difficult to avoid repeated definitions and conflicts in large-scale projects.
By receiving the key-value pair definition information to be stored based on the storage definition platform, a software development toolkit set corresponding to each execution terminal (such as Web, mobile, and desktop) is generated to ensure that an appropriate toolkit set is generated for each definition. , respond to call requests when business code is executed, and avoid conflicts in multi-terminal environments.
It effectively avoids definition conflicts of key-value pairs in multi-terminal environments, ensures the effectiveness and consistency of key-value pair storage calls, reduces development complexity and repeated definitions, and improves code development efficiency and quality.
Smart Images

Figure CN118550663A
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer technology, and in particular to a key-value pair storage and calling method, device, medium and equipment for a multi-terminal environment. Background Art
[0002] Defining and managing storage keys is a headache in Web development. Although in small-scale projects, the definition of keys can be negotiated in a single project, the possibility of conflicts or historical debts is low. However, in large-scale projects, due to the same origin (i.e., the same domain name), the storage area is the same, and it is difficult to avoid duplication of key-value pair definitions. Especially in cross-end scenarios, the management problem of key-value pairs will continue to expand, and may conflict with the key-value pairs stored on the APP or desktop side, thus bringing potential risks. Therefore, how to avoid conflicts in the definition of key-value pairs in a multi-end environment and ensure the validity of key-value pair storage calls has become a technical problem that needs to be solved urgently. Summary of the invention
[0003] The embodiments of the present application provide a key-value pair storage call method, apparatus, medium and device for a multi-terminal environment, which can at least to a certain extent avoid conflicts in the definition of key-value pairs in a multi-terminal environment and ensure the validity of the key-value pair storage call.
[0004] Other features and advantages of the present application will become apparent from the following detailed description, or may be learned in part by the practice of the present application.
[0005] According to one aspect of an embodiment of the present application, a key-value pair storage calling method for a multi-terminal environment is provided, including:
[0006] Receiving definition information of a key-value pair to be stored based on a storage definition platform, the definition information including a business module associated with the key-value pair to be stored;
[0007] Generate a software development kit set corresponding to each execution end according to the definition information of the key-value pair to be stored and the definition information of the key-value pair previously stored, wherein the execution end includes a web end, a mobile end, and a desktop end, and the software development kit set includes a software development kit corresponding to at least one business module;
[0008] In response to a call request during the execution of the business code, the software development toolkit set corresponding to the execution end running the business code is called.
[0009] According to one aspect of an embodiment of the present application, a key-value pair storage and calling device for a multi-terminal environment is provided, comprising:
[0010] A receiving module, configured to receive definition information of a key-value pair to be stored based on a storage definition platform, wherein the definition information includes a business module associated with the key-value pair to be stored;
[0011] A generating module, configured to generate a software development kit set corresponding to each execution end according to the definition information of the key-value pair to be stored and the definition information of the key-value pair previously stored, wherein the execution end includes a web end, a mobile end, and a desktop end, and the software development kit set includes a software development kit corresponding to at least one business module;
[0012] The processing module is used to respond to a call request when the business code is executed and call the software development toolkit set corresponding to the execution end running the business code.
[0013] According to one aspect of an embodiment of the present application, a computer-readable medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the key-value pair storage calling method for a multi-terminal environment as described in the above embodiment is implemented.
[0014] According to one aspect of an embodiment of the present application, an electronic device is provided, comprising: one or more processors; a storage device for storing one or more programs, wherein when the one or more programs are executed by the one or more processors, the one or more processors implement a key-value pair storage calling method for a multi-terminal environment as described in the above-mentioned embodiments.
[0015] According to one aspect of an embodiment of the present application, a computer program product or a computer program is provided, the computer program product or the computer program including computer instructions, the computer instructions being stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device executes the key-value pair storage calling method for a multi-terminal environment provided in the above embodiment.
[0016] In the technical solutions provided in some embodiments of the present application, by receiving definition information of key-value pairs to be stored based on a storage definition platform, the definition information includes a business module associated with the key-value pairs to be stored, and generating a software development kit set corresponding to each execution end according to the definition information of the key-value pairs to be stored and the definition information of the key-value pairs previously stored, the execution end includes a web end, a mobile end, and a desktop end, and the software development kit set includes a software development kit corresponding to at least one business module; then, in response to a call request during the execution of the business code, the software development kit set corresponding to the execution end running the business code is called. Thus, by generating a software development kit set corresponding to each execution end when defining each key-value pair, the software development kit set includes software development kits corresponding to each business module, so that when the business code is subsequently executed, if a call is needed, the software development kit set corresponding to the execution end on which it is running can be called, thereby avoiding conflicts in the definition of key-value pairs in a multi-end environment and ensuring the validity of the key-value pair storage call.
[0017] It should be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present application. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] The drawings herein are incorporated into the specification and constitute a part of the specification, showing embodiments consistent with the present application, and together with the specification, are used to explain the principles of the present application. Obviously, the drawings described below are only some embodiments of the present application, and for ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work. In the drawings:
[0019] Figure 1 A schematic diagram of a process flow of a key-value pair storage calling method for a multi-terminal environment according to an embodiment of the present application is shown;
[0020] Figure 2 A block diagram of a key-value pair storage and calling device for a multi-terminal environment according to an embodiment of the present application is shown;
[0021] Figure 3 A schematic diagram of the structure of a computer system suitable for implementing an electronic device of an embodiment of the present application is shown. DETAILED DESCRIPTION
[0022] Example embodiments will now be described more fully with reference to the accompanying drawings. However, example embodiments can be implemented in a variety of forms and should not be construed as limited to the examples set forth herein; rather, these embodiments are provided so that this application will be more comprehensive and complete and fully convey the concept of the example embodiments to those skilled in the art.
[0023] In addition, described feature, structure or characteristic can be combined in one or more embodiments in any suitable manner. In the following description, many specific details are provided to provide a full understanding of the embodiments of the present application. However, those skilled in the art will appreciate that the technical scheme of the present application can be put into practice without one or more of the specific details, or other methods, components, devices, steps, etc. can be adopted. In other cases, known methods, devices, realizations or operations are not shown or described in detail to avoid blurring the various aspects of the application.
[0024] The block diagrams shown in the accompanying drawings are merely functional entities and do not necessarily correspond to physically independent entities. That is, these functional entities may be implemented in software form, or in one or more hardware modules or integrated circuits, or in different networks and / or processor devices and / or microcontroller devices.
[0025] The flowcharts shown in the accompanying drawings are only exemplary and do not necessarily include all the contents and operations / steps, nor must they be executed in the order described. For example, some operations / steps can be decomposed, and some operations / steps can be combined or partially combined, so the actual execution order may change according to actual conditions.
[0026] Figure 1 A schematic flow chart of a key-value pair storage calling method for a multi-terminal environment according to an embodiment of the present application is shown.
[0027] It should be noted that the method can be applied to a terminal device or a server. The terminal device may include but is not limited to one or more of a smart phone, a tablet computer, a portable computer, and a desktop computer; the server may be a physical server or a cloud server.
[0028] Please refer to Figure 1 The key-value pair storage calling method for a multi-terminal environment includes at least steps S110 to S130, which are described in detail as follows (the method is described below by taking the application of the method to a terminal device as an example, hereinafter referred to as "terminal"):
[0029] In step S110, definition information of the key-value pairs to be stored is received based on the storage definition platform, where the definition information includes a business module associated with the key-value pairs to be stored.
[0030] In this embodiment, in the key-value storage, a key is a unique identifier used to locate the location of data; a value is data associated with the key and can be any data type. Through the combination of key and value, the key-value storage can achieve fast data access and retrieval.
[0031] The present application also provides a storage definition platform, which is used for developers to edit key-value pairs (including adding, deleting, modifying, and checking, etc.), that is, developers can log in to the storage definition platform and query the definition information of the stored key-value pairs on the storage definition platform, and support developers to modify the definition information of the stored key-value pairs on the storage definition platform, and when it is necessary to define and store new key-value pairs, developers can add new definition information of key-value pairs on the storage definition platform, and when it is necessary to delete the definition information of the stored key-value pairs, developers can also perform corresponding operations through the storage definition platform. Therefore, the definition and management of key-value pairs through a unified platform can avoid duplicate definitions and conflicts, and it is also convenient for developers to track and find problems.
[0032] The definition information can be used to characterize the relevant attribute information of the key-value pair, and the storage definition platform can provide several editing options, such as input boxes, selection boxes, etc., to facilitate developers to define key-value pairs. In one example, the definition information can include but is not limited to one or more of the storage key, the associated business module, the storage description, and the storage content parameter list (such as parameter name, parameter type, and parameter description, etc.).
[0033] It is worth noting that the definition information of the key-value pair includes the business module associated with the key-value pair. That is, different businesses are divided into several business modules in advance. When defining and storing key-value pairs, it is only necessary to distinguish the business modules associated with the key-value pairs without distinguishing the end side (that is, which execution end it corresponds to). Different end sides use the same storage key definition, thereby reducing development workload and complexity.
[0034] It should be noted that the key-value pair to be stored may be a key-value pair newly added by the developer, or may be a previously stored key-value pair, for example, the developer modifies the definition information of the stored key-value pair, etc., and there is no special limitation on this.
[0035] In addition, the number of key-value pairs to be stored can be one, two, or any number above two. That is, developers can modify, add, or delete key-value pairs one by one, or perform batch processing on key-value pairs, thereby realizing batch modification and addition and deletion and improving processing efficiency.
[0036] In one example, the storage definition platform also provides unified public and private specification definitions, that is, defines unified public and private rules for storage data, making data binding clearer and more standardized.
[0037] In step S120, a software development kit set corresponding to each execution end is generated based on the definition information of the key-value pairs to be stored and the definition information of the key-value pairs previously stored, and the execution end includes a web end, a mobile end, and a desktop end, and the software development kit set includes a software development kit corresponding to at least one business module.
[0038] In this embodiment, according to the definition information of the key-value pairs to be stored received by the storage definition platform and the definition information of the key-value pairs previously stored, the terminal can generate software development kit sets corresponding to each execution end. In other words, the newly generated software development kit set contains the definition information of the key-value pairs stored historically and the definition information of the key-value pairs newly added by the developer to avoid data missing. In one example, the execution end may include but is not limited to one or more of a web end, a mobile end, and a desktop end. For example, if the execution end includes a web end, a mobile end, and a desktop end, the terminal can generate three software development kit sets respectively, corresponding to the three execution ends respectively.
[0039] The software development kit includes a software development kit (SDK) corresponding to at least one business module, that is, the terminal can generate a software development kit corresponding to each business module based on the definition information of the key-value pairs corresponding to each business module (including newly added key-value pairs and historically stored key-value pairs). When the software development kit needs to be called subsequently, it is only necessary to distinguish the execution end and the corresponding business module to make the corresponding call, so as to avoid conflicts in the definition of key-value pairs in a multi-end environment and ensure the validity of the key-value pair storage call.
[0040] It should be understood that by providing cross-end storage encapsulation and adopting a unified SDK, the logical complexity on the user side can be eliminated. There is no need to write complex conditional judgment statements such as if-else, which greatly improves code development efficiency and code quality.
[0041] After generating the software development toolkit sets corresponding to the execution ends, the software development toolkit sets can be published to the NPM repository for subsequent calls.
[0042] In one embodiment of the present application, before receiving definition information of the key-value pair to be stored based on the storage definition platform, the method further includes:
[0043] In response to a query request for definition information of a key-value pair, an editing interface for previously stored definition information of the key-value pair is displayed on a display interface.
[0044] In this embodiment, when a developer wants to query the definition information of a stored key-value pair, he can generate a query request for the definition information of the key-value pair by clicking a specific area on the terminal interface (such as a "key-value pair definition query" button, etc.). Then, after receiving the query request, the storage definition platform can display an editing interface for the definition information of the previously stored key-value pair on the display interface of the terminal. The editing interface can include several editing options for the developer to perform operations such as adding, deleting, and modifying the definition information of the key-value pair.
[0045] Therefore, by providing a visual editing interface for developers to manage and maintain storage parameters, duplicate definitions can be prevented, and the system can be made easier to maintain and prevent system degradation.
[0046] In step S130, in response to a call request during the execution of the business code, the software development toolkit set corresponding to the execution end running the business code is called.
[0047] Among them, the business code can be a code used to implement a certain or a series of business functions. When the business code is executed and the corresponding key needs to be called, a corresponding call request can be generated. Based on the call request, the terminal can determine the execution end running the business code, that is, on which end the business code is running, and then call the software development toolkit set corresponding to the execution end to implement the corresponding business function. In one example, the call request can include identification information of the execution end running the business code, and the terminal can call the corresponding software development toolkit set according to the identification information of the execution end to avoid calling errors.
[0048] exist Figure 1 In the illustrated embodiment, by receiving definition information of a key-value pair to be stored based on a storage definition platform, the definition information includes a business module associated with the key-value pair to be stored, and generating a software development kit set corresponding to each execution end according to the definition information of the key-value pair to be stored and the definition information of the key-value pair previously stored, the execution end includes a web end, a mobile end, and a desktop end, and the software development kit set includes a software development kit corresponding to at least one business module; then, in response to a call request during the execution of the business code, the software development kit set corresponding to the execution end running the business code is called. Thus, by generating a software development kit set corresponding to each execution end each time a key-value pair is defined, the software development kit set includes software development kits corresponding to each business module, so that when the business code is subsequently executed, if a call is needed, the software development kit set corresponding to the execution end on which it is running can be called, thereby avoiding conflicts in the definition of key-value pairs in a multi-end environment and ensuring the validity of the key-value pair storage call.
[0049] In one embodiment of the present application, before generating a software development kit corresponding to each execution end according to the definition information of the current key-value pair and the definition information of the previously stored key-value pair, the method further includes:
[0050] Based on the definition information of the key-value pair to be stored, determining whether the definition information of the key-value pair currently corresponding to the business module associated with the key-value pair to be stored has changed from the definition information of the key-value pair previously corresponding to it;
[0051] If there is a change, after generating a software development kit corresponding to the business module associated with the key-value pair to be stored, update its corresponding version number.
[0052] In this embodiment, in order to avoid confusion in version management, before generating the software development kits corresponding to each business module, the terminal can determine whether the definition information of the key-value pair currently corresponding to the business module associated with the key-value pair to be stored has changed (such as added, modified or deleted) from the definition information of the previously corresponding key-value pair based on the definition information of the key-value pair to be stored. In the case of a change, after generating the software development kit corresponding to the business module, update its corresponding version number (such as adding 0.0.1 to the original version number to obtain a new version number), so that the latest software development kit can be called in subsequent calls. If there is no change, the previous version number will be used after generating the software development kit corresponding to the business module.
[0053] In one example, the terminal can check all business modules one by one to determine whether the definition information of the key-value pairs corresponding to each business module changes after the definition storage operation of the current key-value pair (i.e., the key-value pair to be stored) to ensure the validity of the check.
[0054] In another example, the terminal may also detect only the business module according to the business module associated with the key-value pair to be stored, to determine whether the definition information of the key-value pair corresponding to the business module has changed.
[0055] In one example, when detecting whether the definition information of the key-value pair corresponding to a business module has changed, a sha1 unique identifier can be generated based on the definition information of the key-value pair currently corresponding to the business module (if there is a corresponding key-value pair to be stored, the definition information of the key-value pair to be stored is also included), and the latest sha1 unique identifier is compared with the previously cached sha1 unique identifier corresponding to the business module. If the two are consistent, it indicates that the definition information of the key-value pair corresponding to the business module has not changed. If the two are inconsistent, it indicates that the definition information of the key-value pair corresponding to the business module has changed, and the version number of its software development kit needs to be updated.
[0056] In other examples, those skilled in the art may also adopt other existing detection methods to determine whether the definition information of the key-value pair corresponding to the business module has changed, and there is no special limitation on this.
[0057] In one embodiment of the present application, a software development kit set corresponding to each execution end is generated according to the definition information of the key-value pair to be stored and the definition information of the key-value pair previously stored, including:
[0058] According to the definition information of the key-value pairs to be stored and the definition information of the key-value pairs previously stored, a preset code generation rule is executed to obtain a software development toolkit set corresponding to each execution end.
[0059] In this embodiment, the code generation rules can be pre-set by those skilled in the art to automatically generate code generation specifications for software development kits corresponding to each business module. Thus, by automatically generating software development kits corresponding to each business module through pre-set code generation rules, code quality and development efficiency can be improved, and the tedious work of manually writing codes can be avoided. Moreover, through the constraints of code generation rules, the maintainability and consistency of the generated code can be improved.
[0060] In one example, the software development kit corresponding to each business module can be written in Python, because the language is concise, easy to understand and cross-platform, and it also has the support of third-party libraries and tools, which is suitable for realizing the functions of automatic code generation and file processing.
[0061] In one embodiment of the present application, after invoking the software development toolkit set corresponding to the execution end running the business code in response to a call request during the execution of the business code, the method further includes:
[0062] If the execution end running the business code is a web end, a data access request is sent to the local Storage;
[0063] If the execution end running the business code is a mobile end or a desktop end, a data access request is sent to the mobile end or the desktop end through a cross-end calling protocol.
[0064] In this embodiment, during the execution of the business code, if data access is required, the corresponding access operation can be performed according to the execution end running the business code. For example, when the front-end business is called (i.e., when the business code is executed), the called software development kit provides a standardized storage definition API (i.e., Schema API) for access operations. The Schema API can make internal judgments. If it is in a browser environment (i.e., the execution end running the business code is the web end), a request for accessing data can be directly initiated to the local storage of the browser. If it is in an APP or desktop end (i.e., the execution end running the business code is the mobile end or the desktop end), a request for accessing data can be initiated to the APP or desktop end through a cross-end calling protocol (e.g., GNB protocol).
[0065] The following describes an apparatus embodiment of the present application, which can be used to execute the key-value pair storage calling method for a multi-terminal environment in the above-mentioned embodiment of the present application. For details not disclosed in the apparatus embodiment of the present application, please refer to the embodiment of the key-value pair storage calling method for a multi-terminal environment in the above-mentioned present application.
[0066] Figure 2 A block diagram of a key-value pair storage and calling device for a multi-terminal environment according to an embodiment of the present application is shown.
[0067] Reference Figure 2 As shown, according to an embodiment of the present application, a key-value pair storage calling device for a multi-terminal environment includes:
[0068] A receiving module, configured to receive definition information of a key-value pair to be stored based on a storage definition platform, wherein the definition information includes a business module associated with the key-value pair to be stored;
[0069] A generating module, configured to generate a software development kit set corresponding to each execution end according to the definition information of the key-value pair to be stored and the definition information of the key-value pair previously stored, wherein the execution end includes a web end, a mobile end, and a desktop end, and the software development kit set includes a software development kit corresponding to at least one business module;
[0070] The processing module is used to respond to a call request when the business code is executed and call the software development toolkit set corresponding to the execution end running the business code.
[0071] In one embodiment of the present application, before generating a software development kit corresponding to each execution end according to the definition information of the current key-value pair and the definition information of the previously stored key-value pair, the generation module is further used to:
[0072] Based on the definition information of the key-value pair to be stored, determining whether the definition information of the key-value pair currently corresponding to the business module associated with the key-value pair to be stored has changed from the definition information of the key-value pair previously corresponding to it;
[0073] If there is a change, after generating a software development kit corresponding to the business module associated with the key-value pair to be stored, update its corresponding version number.
[0074] In one embodiment of the present application, a software development kit set corresponding to each execution end is generated according to the definition information of the key-value pair to be stored and the definition information of the key-value pair previously stored, including:
[0075] According to the definition information of the key-value pairs to be stored and the definition information of the key-value pairs previously stored, a preset code generation rule is executed to obtain a software development toolkit set corresponding to each execution end.
[0076] In one embodiment of the present application, after responding to a call request during the execution of the business code and calling the software development toolkit set corresponding to the execution end running the business code, the processing module is further used to:
[0077] If the execution end running the business code is a web end, a data access request is sent to the local Storage;
[0078] If the execution end running the business code is a mobile end or a desktop end, a data access request is sent to the mobile end or the desktop end through a cross-end calling protocol.
[0079] In one embodiment of the present application, before receiving definition information of the key-value pair to be stored based on the storage definition platform, the receiving module is further used to:
[0080] In response to a query request for definition information of a key-value pair, an editing interface for previously stored definition information of the key-value pair is displayed on a display interface.
[0081] Figure 3 A schematic diagram of the structure of a computer system suitable for implementing an electronic device of an embodiment of the present application is shown.
[0082] It should be noted that Figure 3 The computer system of the electronic device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present application.
[0083] like Figure 3As shown, the computer system includes a central processing unit (CPU) 301, which can perform various appropriate actions and processes according to the program stored in the read-only memory (ROM) 302 or the program loaded from the storage part 308 to the random access memory (RAM) 303, such as executing the method described in the above embodiment. In RAM 303, various programs and data required for system operation are also stored. CPU 301, ROM 302 and RAM 303 are connected to each other through bus 304. Input / output (I / O) interface 305 is also connected to bus 304.
[0084] The following components are connected to the I / O interface 305: an input section 306 including a keyboard, a mouse, etc.; an output section 307 including a cathode ray tube (CRT), a liquid crystal display (LCD), etc., and a speaker; a storage section 308 including a hard disk, etc.; and a communication section 309 including a network interface card such as a LAN (Local Area Network) card, a modem, etc. The communication section 309 performs communication processing via a network such as the Internet. A drive 310 is also connected to the I / O interface 305 as needed. A removable medium 311, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed on the drive 310 as needed so that a computer program read therefrom is installed into the storage section 308 as needed.
[0085] In particular, according to an embodiment of the present application, the process described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present application includes a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes a computer program for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network through a communication section 309, and / or installed from a removable medium 311. When the computer program is executed by a central processing unit (CPU) 301, various functions defined in the system of the present application are executed.
[0086] It should be noted that the computer-readable medium shown in the embodiment of the present application may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium may be, for example, - but not limited to - an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM), a flash memory, an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present application, a computer-readable storage medium may be any tangible medium containing or storing a program, which may be used by an instruction execution system, device or device or used in combination with it. In the present application, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, wherein a computer-readable computer program is carried. Such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. Computer-readable signal media may also be any computer-readable medium other than computer-readable storage media, which may send, propagate, or transmit programs for use by or in conjunction with an instruction execution system, apparatus, or device. The computer program contained on the computer-readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wired, etc., or any suitable combination of the above.
[0087] The flowchart and block diagram in the accompanying drawings illustrate the possible architecture, functions and operations of the system, method and computer program product according to various embodiments of the present application. Wherein, each box in the flowchart or block diagram can represent a module, a program segment, or a part of the code, and the above-mentioned module, program segment, or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram or flowchart, and the combination of boxes in the block diagram or flowchart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0088] The units involved in the embodiments described in this application may be implemented by software or hardware, and the units described may also be set in a processor. The names of these units do not, in some cases, constitute limitations on the units themselves.
[0089] As another aspect, the present application also provides a computer-readable medium, which may be included in the electronic device described in the above embodiment; or may exist independently without being assembled into the electronic device. The above computer-readable medium carries one or more programs, and when the above one or more programs are executed by an electronic device, the electronic device implements the method described in the above embodiment.
[0090] It should be noted that, although several modules or units of the equipment for action execution are mentioned in the above detailed description, this division is not mandatory. In fact, according to the embodiments of the present application, the features and functions of two or more modules or units described above can be embodied in one module or unit. On the contrary, the features and functions of one module or unit described above can be further divided into being embodied by multiple modules or units.
[0091] Through the description of the above implementation methods, it is easy for those skilled in the art to understand that the example implementation methods described here can be implemented by software or by combining software with necessary hardware. Therefore, the technical solution according to the implementation methods of the present application can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (which can be a CD-ROM, a USB flash drive, a mobile hard disk, etc.) or on a network, and includes several instructions to enable a computing device (which can be a personal computer, a server, a touch terminal, or a network device, etc.) to execute the method according to the implementation methods of the present application.
[0092] Those skilled in the art will readily appreciate other embodiments of the present application after considering the specification and practicing the embodiments disclosed herein. The present application is intended to cover any variations, uses or adaptations of the present application, which follow the general principles of the present application and include common knowledge or customary technical means in the art that are not disclosed in the present application.
[0093] It should be understood that the present application is not limited to the precise structures that have been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present application is limited only by the appended claims.
Claims
1. A key-value pair storage calling method for multi-terminal environments, It is characterized in that include: Receiving definition information of a key-value pair to be stored based on a storage definition platform, the definition information including a business module associated with the key-value pair to be stored; Generate a software development kit set corresponding to each execution end according to the definition information of the key-value pair to be stored and the definition information of the key-value pair previously stored, wherein the execution end includes a web end, a mobile end, and a desktop end, and the software development kit set includes a software development kit corresponding to at least one business module; In response to a call request during the execution of the business code, the software development toolkit set corresponding to the execution end running the business code is called.
2. The method according to claim 1, It is characterized in that Before generating a software development kit corresponding to each execution end according to the current definition information of the key-value pair and the previously stored definition information of the key-value pair, the method further includes: Based on the definition information of the key-value pair to be stored, determining whether the definition information of the key-value pair currently corresponding to the business module associated with the key-value pair to be stored has changed from the definition information of the key-value pair previously corresponding to it; If there is a change, after generating a software development kit corresponding to the business module associated with the key-value pair to be stored, update its corresponding version number.
3. The method according to claim 1, It is characterized in that According to the definition information of the key-value pairs to be stored and the definition information of the key-value pairs previously stored, a software development kit set corresponding to each execution end is generated, including: According to the definition information of the key-value pairs to be stored and the definition information of the key-value pairs previously stored, a preset code generation rule is executed to obtain a software development toolkit set corresponding to each execution end.
4. The method according to any one of claims 1 to 3, It is characterized in that After invoking the software development toolkit set corresponding to the execution end running the business code in response to a call request during the execution of the business code, the method further includes: If the execution end running the business code is a web end, a data access request is sent to the local Storage; If the execution end running the business code is a mobile end or a desktop end, a data access request is sent to the mobile end or the desktop end through a cross-end calling protocol.
5. The method according to claim 1, It is characterized in that Before receiving definition information of the key-value pairs to be stored based on the storage definition platform, the method further includes: In response to a query request for definition information of a key-value pair, an editing interface for previously stored definition information of the key-value pair is displayed on a display interface.
6. A key-value pair storage and calling device for a multi-terminal environment, It is characterized in that include: A receiving module, configured to receive definition information of a key-value pair to be stored based on a storage definition platform, wherein the definition information includes a business module associated with the key-value pair to be stored; A generating module, configured to generate a software development kit set corresponding to each execution end according to the definition information of the key-value pair to be stored and the definition information of the key-value pair previously stored, wherein the execution end includes a web end, a mobile end, and a desktop end, and the software development kit set includes a software development kit corresponding to at least one business module; The processing module is used to respond to a call request when the business code is executed and call the software development toolkit set corresponding to the execution end running the business code.
7. The device according to claim 6, It is characterized in that Before generating a software development kit corresponding to each execution end according to the current definition information of the key-value pair and the previously stored definition information of the key-value pair, the generating module is further used to: Based on the definition information of the key-value pair to be stored, determining whether the definition information of the key-value pair currently corresponding to the business module associated with the key-value pair to be stored has changed from the definition information of the key-value pair previously corresponding to it; If there is a change, after generating a software development kit corresponding to the business module associated with the key-value pair to be stored, update its corresponding version number.
8. The device according to claim 6, It is characterized in that According to the definition information of the key-value pairs to be stored and the definition information of the key-value pairs previously stored, a software development kit set corresponding to each execution end is generated, including: According to the definition information of the key-value pairs to be stored and the definition information of the key-value pairs previously stored, a preset code generation rule is executed to obtain a software development toolkit set corresponding to each execution end.
9. A computer readable medium having a computer program stored thereon, It is characterized in that When the computer program is executed by a processor, the key-value pair storage calling method for a multi-terminal environment is implemented as described in any one of claims 1 to 5.
10. An electronic device, It is characterized in that include: one or more processors; A storage device for storing one or more programs, which, when executed by the one or more processors, enables the one or more processors to implement the key-value pair storage calling method for a multi-terminal environment as described in any one of claims 1 to 5.
